diff options
author | Christoph Hellwig <hch@infradead.org> | 2013-12-06 15:30:09 -0500 |
---|---|---|
committer | Ben Myers <bpm@sgi.com> | 2013-12-18 16:39:30 -0500 |
commit | 309ecac8e7c937c5811ef8f0efc14b3d1bd18775 (patch) | |
tree | b1a34a04e6ac1500e456d5d3ecca5d7cfb56a7c7 /fs/xfs/xfs_inode.c | |
parent | 01f4f3277556d4f4f833371db0219b0ca11c5409 (diff) |
xfs: rename xfs_ilock_map_shared
Make it clear that we're only locking against the extent map on the data
fork. Also clean the function up a little bit.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_inode.c')
-rw-r--r-- | fs/xfs/xfs_inode.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c index 967f90625eae..fdd483783365 100644 --- a/fs/xfs/xfs_inode.c +++ b/fs/xfs/xfs_inode.c | |||
@@ -91,20 +91,15 @@ xfs_get_extsz_hint( | |||
91 | * xfs_iunlock() call. | 91 | * xfs_iunlock() call. |
92 | */ | 92 | */ |
93 | uint | 93 | uint |
94 | xfs_ilock_map_shared( | 94 | xfs_ilock_data_map_shared( |
95 | xfs_inode_t *ip) | 95 | struct xfs_inode *ip) |
96 | { | 96 | { |
97 | uint lock_mode; | 97 | uint lock_mode = XFS_ILOCK_SHARED; |
98 | 98 | ||
99 | if ((ip->i_d.di_format == XFS_DINODE_FMT_BTREE) && | 99 | if (ip->i_d.di_format == XFS_DINODE_FMT_BTREE && |
100 | ((ip->i_df.if_flags & XFS_IFEXTENTS) == 0)) { | 100 | (ip->i_df.if_flags & XFS_IFEXTENTS) == 0) |
101 | lock_mode = XFS_ILOCK_EXCL; | 101 | lock_mode = XFS_ILOCK_EXCL; |
102 | } else { | ||
103 | lock_mode = XFS_ILOCK_SHARED; | ||
104 | } | ||
105 | |||
106 | xfs_ilock(ip, lock_mode); | 102 | xfs_ilock(ip, lock_mode); |
107 | |||
108 | return lock_mode; | 103 | return lock_mode; |
109 | } | 104 | } |
110 | 105 | ||
@@ -575,7 +570,7 @@ xfs_lookup( | |||
575 | if (XFS_FORCED_SHUTDOWN(dp->i_mount)) | 570 | if (XFS_FORCED_SHUTDOWN(dp->i_mount)) |
576 | return XFS_ERROR(EIO); | 571 | return XFS_ERROR(EIO); |
577 | 572 | ||
578 | lock_mode = xfs_ilock_map_shared(dp); | 573 | lock_mode = xfs_ilock_data_map_shared(dp); |
579 | error = xfs_dir_lookup(NULL, dp, name, &inum, ci_name); | 574 | error = xfs_dir_lookup(NULL, dp, name, &inum, ci_name); |
580 | xfs_iunlock(dp, lock_mode); | 575 | xfs_iunlock(dp, lock_mode); |
581 | 576 | ||