diff options
Diffstat (limited to 'fs/xfs/xfs_dir2.c')
-rw-r--r-- | fs/xfs/xfs_dir2.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/fs/xfs/xfs_dir2.c b/fs/xfs/xfs_dir2.c index 4580ce00aeb4..a2e27010c7fb 100644 --- a/fs/xfs/xfs_dir2.c +++ b/fs/xfs/xfs_dir2.c | |||
@@ -121,7 +121,7 @@ xfs_dir_isempty( | |||
121 | { | 121 | { |
122 | xfs_dir2_sf_hdr_t *sfp; | 122 | xfs_dir2_sf_hdr_t *sfp; |
123 | 123 | ||
124 | ASSERT((dp->i_d.di_mode & S_IFMT) == S_IFDIR); | 124 | ASSERT(S_ISDIR(dp->i_d.di_mode)); |
125 | if (dp->i_d.di_size == 0) /* might happen during shutdown. */ | 125 | if (dp->i_d.di_size == 0) /* might happen during shutdown. */ |
126 | return 1; | 126 | return 1; |
127 | if (dp->i_d.di_size > XFS_IFORK_DSIZE(dp)) | 127 | if (dp->i_d.di_size > XFS_IFORK_DSIZE(dp)) |
@@ -179,7 +179,7 @@ xfs_dir_init( | |||
179 | memset((char *)&args, 0, sizeof(args)); | 179 | memset((char *)&args, 0, sizeof(args)); |
180 | args.dp = dp; | 180 | args.dp = dp; |
181 | args.trans = tp; | 181 | args.trans = tp; |
182 | ASSERT((dp->i_d.di_mode & S_IFMT) == S_IFDIR); | 182 | ASSERT(S_ISDIR(dp->i_d.di_mode)); |
183 | if ((error = xfs_dir_ino_validate(tp->t_mountp, pdp->i_ino))) | 183 | if ((error = xfs_dir_ino_validate(tp->t_mountp, pdp->i_ino))) |
184 | return error; | 184 | return error; |
185 | return xfs_dir2_sf_create(&args, pdp->i_ino); | 185 | return xfs_dir2_sf_create(&args, pdp->i_ino); |
@@ -202,7 +202,7 @@ xfs_dir_createname( | |||
202 | int rval; | 202 | int rval; |
203 | int v; /* type-checking value */ | 203 | int v; /* type-checking value */ |
204 | 204 | ||
205 | ASSERT((dp->i_d.di_mode & S_IFMT) == S_IFDIR); | 205 | ASSERT(S_ISDIR(dp->i_d.di_mode)); |
206 | if ((rval = xfs_dir_ino_validate(tp->t_mountp, inum))) | 206 | if ((rval = xfs_dir_ino_validate(tp->t_mountp, inum))) |
207 | return rval; | 207 | return rval; |
208 | XFS_STATS_INC(xs_dir_create); | 208 | XFS_STATS_INC(xs_dir_create); |
@@ -278,7 +278,7 @@ xfs_dir_lookup( | |||
278 | int rval; | 278 | int rval; |
279 | int v; /* type-checking value */ | 279 | int v; /* type-checking value */ |
280 | 280 | ||
281 | ASSERT((dp->i_d.di_mode & S_IFMT) == S_IFDIR); | 281 | ASSERT(S_ISDIR(dp->i_d.di_mode)); |
282 | XFS_STATS_INC(xs_dir_lookup); | 282 | XFS_STATS_INC(xs_dir_lookup); |
283 | 283 | ||
284 | memset(&args, 0, sizeof(xfs_da_args_t)); | 284 | memset(&args, 0, sizeof(xfs_da_args_t)); |
@@ -333,7 +333,7 @@ xfs_dir_removename( | |||
333 | int rval; | 333 | int rval; |
334 | int v; /* type-checking value */ | 334 | int v; /* type-checking value */ |
335 | 335 | ||
336 | ASSERT((dp->i_d.di_mode & S_IFMT) == S_IFDIR); | 336 | ASSERT(S_ISDIR(dp->i_d.di_mode)); |
337 | XFS_STATS_INC(xs_dir_remove); | 337 | XFS_STATS_INC(xs_dir_remove); |
338 | 338 | ||
339 | memset(&args, 0, sizeof(xfs_da_args_t)); | 339 | memset(&args, 0, sizeof(xfs_da_args_t)); |
@@ -382,7 +382,7 @@ xfs_readdir( | |||
382 | if (XFS_FORCED_SHUTDOWN(dp->i_mount)) | 382 | if (XFS_FORCED_SHUTDOWN(dp->i_mount)) |
383 | return XFS_ERROR(EIO); | 383 | return XFS_ERROR(EIO); |
384 | 384 | ||
385 | ASSERT((dp->i_d.di_mode & S_IFMT) == S_IFDIR); | 385 | ASSERT(S_ISDIR(dp->i_d.di_mode)); |
386 | XFS_STATS_INC(xs_dir_getdents); | 386 | XFS_STATS_INC(xs_dir_getdents); |
387 | 387 | ||
388 | if (dp->i_d.di_format == XFS_DINODE_FMT_LOCAL) | 388 | if (dp->i_d.di_format == XFS_DINODE_FMT_LOCAL) |
@@ -414,7 +414,7 @@ xfs_dir_replace( | |||
414 | int rval; | 414 | int rval; |
415 | int v; /* type-checking value */ | 415 | int v; /* type-checking value */ |
416 | 416 | ||
417 | ASSERT((dp->i_d.di_mode & S_IFMT) == S_IFDIR); | 417 | ASSERT(S_ISDIR(dp->i_d.di_mode)); |
418 | 418 | ||
419 | if ((rval = xfs_dir_ino_validate(tp->t_mountp, inum))) | 419 | if ((rval = xfs_dir_ino_validate(tp->t_mountp, inum))) |
420 | return rval; | 420 | return rval; |
@@ -464,7 +464,7 @@ xfs_dir_canenter( | |||
464 | if (resblks) | 464 | if (resblks) |
465 | return 0; | 465 | return 0; |
466 | 466 | ||
467 | ASSERT((dp->i_d.di_mode & S_IFMT) == S_IFDIR); | 467 | ASSERT(S_ISDIR(dp->i_d.di_mode)); |
468 | 468 | ||
469 | memset(&args, 0, sizeof(xfs_da_args_t)); | 469 | memset(&args, 0, sizeof(xfs_da_args_t)); |
470 | args.name = name->name; | 470 | args.name = name->name; |