diff options
author | Dave Chinner <david@fromorbit.com> | 2015-08-20 02:28:45 +0300 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2015-08-20 02:28:45 +0300 |
commit | aa493382cb8c5768ba452d87f175fc2aff63911d (patch) | |
tree | 85896c37038d3f5eda1283d090eeb95ee6ec9c82 /fs/xfs/libxfs/xfs_dir2.c | |
parent | 5be203ad115c1d8294e8685253e05fcea0202e04 (diff) | |
parent | 3403ccc0c9f069c40ea751a93ac6746f5ef2116a (diff) | |
download | linux-aa493382cb8c5768ba452d87f175fc2aff63911d.tar.xz |
Merge branch 'xfs-misc-fixes-for-4.3-2' into for-next
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 e0ba97610f01..9de401d297e5 100644 --- a/fs/xfs/libxfs/xfs_dir2.c +++ b/fs/xfs/libxfs/xfs_dir2.c @@ -362,6 +362,7 @@ xfs_dir_lookup( struct xfs_da_args *args; int rval; int v; /* type-checking value */ + int lock_mode; ASSERT(S_ISDIR(dp->i_d.di_mode)); XFS_STATS_INC(xs_dir_lookup); @@ -387,6 +388,7 @@ xfs_dir_lookup( if (ci_name) args->op_flags |= XFS_DA_OP_CILOOKUP; + lock_mode = xfs_ilock_data_map_shared(dp); if (dp->i_d.di_format == XFS_DINODE_FMT_LOCAL) { rval = xfs_dir2_sf_lookup(args); goto out_check_rval; @@ -419,6 +421,7 @@ out_check_rval: } } out_free: + xfs_iunlock(dp, lock_mode); kmem_free(args); return rval; } |