diff options
Diffstat (limited to 'fs')
| -rw-r--r-- | fs/xfs/xfs_dir2_block.c | 7 | ||||
| -rw-r--r-- | fs/xfs/xfs_dir2_leaf.c | 6 | ||||
| -rw-r--r-- | fs/xfs/xfs_dir2_sf.c | 15 | 
3 files changed, 15 insertions, 13 deletions
diff --git a/fs/xfs/xfs_dir2_block.c b/fs/xfs/xfs_dir2_block.c index e2fa0a1d8e9..e1f0a06aaf0 100644 --- a/fs/xfs/xfs_dir2_block.c +++ b/fs/xfs/xfs_dir2_block.c @@ -517,9 +517,9 @@ xfs_dir2_block_getdents(  		/*  		 * If it didn't fit, set the final offset to here & return.  		 */ -		if (filldir(dirent, dep->name, dep->namelen, cook, +		if (filldir(dirent, dep->name, dep->namelen, cook & 0x7fffffff,  			    ino, DT_UNKNOWN)) { -			*offset = cook; +			*offset = cook & 0x7fffffff;  			xfs_da_brelse(NULL, bp);  			return 0;  		} @@ -529,7 +529,8 @@ xfs_dir2_block_getdents(  	 * Reached the end of the block.  	 * Set the offset to a non-existent block 1 and return.  	 */ -	*offset = xfs_dir2_db_off_to_dataptr(mp, mp->m_dirdatablk + 1, 0); +	*offset = xfs_dir2_db_off_to_dataptr(mp, mp->m_dirdatablk + 1, 0) & +			0x7fffffff;  	xfs_da_brelse(NULL, bp);  	return 0;  } diff --git a/fs/xfs/xfs_dir2_leaf.c b/fs/xfs/xfs_dir2_leaf.c index 93535992cb6..ef805a374ee 100644 --- a/fs/xfs/xfs_dir2_leaf.c +++ b/fs/xfs/xfs_dir2_leaf.c @@ -1092,7 +1092,7 @@ xfs_dir2_leaf_getdents(  		 * Won't fit.  Return to caller.  		 */  		if (filldir(dirent, dep->name, dep->namelen, -			    xfs_dir2_byte_to_dataptr(mp, curoff), +			    xfs_dir2_byte_to_dataptr(mp, curoff) & 0x7fffffff,  			    ino, DT_UNKNOWN))  			break; @@ -1108,9 +1108,9 @@ xfs_dir2_leaf_getdents(  	 * All done.  Set output offset value to current offset.  	 */  	if (curoff > xfs_dir2_dataptr_to_byte(mp, XFS_DIR2_MAX_DATAPTR)) -		*offset = XFS_DIR2_MAX_DATAPTR; +		*offset = XFS_DIR2_MAX_DATAPTR & 0x7fffffff;  	else -		*offset = xfs_dir2_byte_to_dataptr(mp, curoff); +		*offset = xfs_dir2_byte_to_dataptr(mp, curoff) & 0x7fffffff;  	kmem_free(map);  	if (bp)  		xfs_da_brelse(NULL, bp); diff --git a/fs/xfs/xfs_dir2_sf.c b/fs/xfs/xfs_dir2_sf.c index b46af0013ec..a8a8a6efad5 100644 --- a/fs/xfs/xfs_dir2_sf.c +++ b/fs/xfs/xfs_dir2_sf.c @@ -752,8 +752,8 @@ xfs_dir2_sf_getdents(  #if XFS_BIG_INUMS  		ino += mp->m_inoadd;  #endif -		if (filldir(dirent, ".", 1, dot_offset, ino, DT_DIR)) { -			*offset = dot_offset; +		if (filldir(dirent, ".", 1, dot_offset & 0x7fffffff, ino, DT_DIR)) { +			*offset = dot_offset & 0x7fffffff;  			return 0;  		}  	} @@ -766,8 +766,8 @@ xfs_dir2_sf_getdents(  #if XFS_BIG_INUMS  		ino += mp->m_inoadd;  #endif -		if (filldir(dirent, "..", 2, dotdot_offset, ino, DT_DIR)) { -			*offset = dotdot_offset; +		if (filldir(dirent, "..", 2, dotdot_offset & 0x7fffffff, ino, DT_DIR)) { +			*offset = dotdot_offset & 0x7fffffff;  			return 0;  		}  	} @@ -791,14 +791,15 @@ xfs_dir2_sf_getdents(  #endif  		if (filldir(dirent, sfep->name, sfep->namelen, -					    off, ino, DT_UNKNOWN)) { -			*offset = off; +			    off & 0x7fffffff, ino, DT_UNKNOWN)) { +			*offset = off & 0x7fffffff;  			return 0;  		}  		sfep = xfs_dir2_sf_nextentry(sfp, sfep);  	} -	*offset = xfs_dir2_db_off_to_dataptr(mp, mp->m_dirdatablk + 1, 0); +	*offset = xfs_dir2_db_off_to_dataptr(mp, mp->m_dirdatablk + 1, 0) & +			0x7fffffff;  	return 0;  }  |