diff options
Diffstat (limited to 'fs/xfs/libxfs/xfs_dir2.c')
-rw-r--r-- | fs/xfs/libxfs/xfs_dir2.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/xfs/libxfs/xfs_dir2.c b/fs/xfs/libxfs/xfs_dir2.c index a69fb3a1e161..42799d88ecc0 100644 --- a/fs/xfs/libxfs/xfs_dir2.c +++ b/fs/xfs/libxfs/xfs_dir2.c | |||
@@ -362,6 +362,7 @@ xfs_dir_lookup( | |||
362 | struct xfs_da_args *args; | 362 | struct xfs_da_args *args; |
363 | int rval; | 363 | int rval; |
364 | int v; /* type-checking value */ | 364 | int v; /* type-checking value */ |
365 | int lock_mode; | ||
365 | 366 | ||
366 | ASSERT(S_ISDIR(dp->i_d.di_mode)); | 367 | ASSERT(S_ISDIR(dp->i_d.di_mode)); |
367 | XFS_STATS_INC(xs_dir_lookup); | 368 | XFS_STATS_INC(xs_dir_lookup); |
@@ -387,6 +388,7 @@ xfs_dir_lookup( | |||
387 | if (ci_name) | 388 | if (ci_name) |
388 | args->op_flags |= XFS_DA_OP_CILOOKUP; | 389 | args->op_flags |= XFS_DA_OP_CILOOKUP; |
389 | 390 | ||
391 | lock_mode = xfs_ilock_data_map_shared(dp); | ||
390 | if (dp->i_d.di_format == XFS_DINODE_FMT_LOCAL) { | 392 | if (dp->i_d.di_format == XFS_DINODE_FMT_LOCAL) { |
391 | rval = xfs_dir2_sf_lookup(args); | 393 | rval = xfs_dir2_sf_lookup(args); |
392 | goto out_check_rval; | 394 | goto out_check_rval; |
@@ -419,6 +421,7 @@ out_check_rval: | |||
419 | } | 421 | } |
420 | } | 422 | } |
421 | out_free: | 423 | out_free: |
424 | xfs_iunlock(dp, lock_mode); | ||
422 | kmem_free(args); | 425 | kmem_free(args); |
423 | return rval; | 426 | return rval; |
424 | } | 427 | } |