aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_dir2_sf.c
diff options
context:
space:
mode:
authorBarry Naujok <bnaujok@sgi.com>2008-05-21 02:42:05 -0400
committerNiv Sardi <xaiki@debian.org>2008-07-28 02:58:37 -0400
commit6a178100abf01282eb697ab62b6086b2886dfc00 (patch)
tree5830f1257fc9662c0f9dcd107eda5377de716a4c /fs/xfs/xfs_dir2_sf.c
parent5163f95a08cbf058ae16452c2242c5600fedc32e (diff)
[XFS] Add op_flags field and helpers to xfs_da_args
The end of the xfs_da_args structure has 4 unsigned char fields for true/false information on directory and attr operations using the xfs_da_args structure. The following converts these 4 into a op_flags field that uses the first 4 bits for these fields and allows expansion for future operation information (eg. case-insensitive lookup request). SGI-PV: 981520 SGI-Modid: xfs-linux-melb:xfs-kern:31206a Signed-off-by: Barry Naujok <bnaujok@sgi.com> Signed-off-by: Christoph Hellwig <hch@infradead.org>
Diffstat (limited to 'fs/xfs/xfs_dir2_sf.c')
-rw-r--r--fs/xfs/xfs_dir2_sf.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/xfs/xfs_dir2_sf.c b/fs/xfs/xfs_dir2_sf.c
index dcd09cada43f..9409fd3e565f 100644
--- a/fs/xfs/xfs_dir2_sf.c
+++ b/fs/xfs/xfs_dir2_sf.c
@@ -332,7 +332,7 @@ xfs_dir2_sf_addname(
332 /* 332 /*
333 * Just checking or no space reservation, it doesn't fit. 333 * Just checking or no space reservation, it doesn't fit.
334 */ 334 */
335 if (args->justcheck || args->total == 0) 335 if ((args->op_flags & XFS_DA_OP_JUSTCHECK) || args->total == 0)
336 return XFS_ERROR(ENOSPC); 336 return XFS_ERROR(ENOSPC);
337 /* 337 /*
338 * Convert to block form then add the name. 338 * Convert to block form then add the name.
@@ -345,7 +345,7 @@ xfs_dir2_sf_addname(
345 /* 345 /*
346 * Just checking, it fits. 346 * Just checking, it fits.
347 */ 347 */
348 if (args->justcheck) 348 if (args->op_flags & XFS_DA_OP_JUSTCHECK)
349 return 0; 349 return 0;
350 /* 350 /*
351 * Do it the easy way - just add it at the end. 351 * Do it the easy way - just add it at the end.
@@ -869,7 +869,7 @@ xfs_dir2_sf_lookup(
869 return XFS_ERROR(EEXIST); 869 return XFS_ERROR(EEXIST);
870 } 870 }
871 } 871 }
872 ASSERT(args->oknoent); 872 ASSERT(args->op_flags & XFS_DA_OP_OKNOENT);
873 /* 873 /*
874 * Here, we can only be doing a lookup (not a rename or replace). 874 * Here, we can only be doing a lookup (not a rename or replace).
875 * If a case-insensitive match was found earlier, return "found". 875 * If a case-insensitive match was found earlier, return "found".
@@ -1071,7 +1071,7 @@ xfs_dir2_sf_replace(
1071 * Didn't find it. 1071 * Didn't find it.
1072 */ 1072 */
1073 if (i == sfp->hdr.count) { 1073 if (i == sfp->hdr.count) {
1074 ASSERT(args->oknoent); 1074 ASSERT(args->op_flags & XFS_DA_OP_OKNOENT);
1075#if XFS_BIG_INUMS 1075#if XFS_BIG_INUMS
1076 if (i8elevated) 1076 if (i8elevated)
1077 xfs_dir2_sf_toino4(args); 1077 xfs_dir2_sf_toino4(args);