aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/libxfs/xfs_dir2.c
diff options
context:
space:
mode:
authorDave Chinner <david@fromorbit.com>2015-08-20 09:28:45 +1000
committerDave Chinner <david@fromorbit.com>2015-08-20 09:28:45 +1000
commitaa493382cb8c5768ba452d87f175fc2aff63911d (patch)
tree85896c37038d3f5eda1283d090eeb95ee6ec9c82 /fs/xfs/libxfs/xfs_dir2.c
parentMerge branch 'xfs-efi-rework' into for-next (diff)
parentxfs: inode lockdep annotations broke non-lockdep build (diff)
downloadlinux-dev-aa493382cb8c5768ba452d87f175fc2aff63911d.tar.xz
linux-dev-aa493382cb8c5768ba452d87f175fc2aff63911d.zip
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.c3
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;
}