diff options
author | Christoph Hellwig <hch@infradead.org> | 2013-12-06 15:30:08 -0500 |
---|---|---|
committer | Ben Myers <bpm@sgi.com> | 2013-12-18 16:38:57 -0500 |
commit | 01f4f3277556d4f4f833371db0219b0ca11c5409 (patch) | |
tree | 393ca8f6130a12c5a64e4d5ab42a907f60fb9847 /fs/xfs | |
parent | 30ba7ad54335e4715d3cc9cc8f43cbf1b3535e46 (diff) |
xfs: remove xfs_iunlock_map_shared
We can just use xfs_iunlock without any loss of clarity.
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')
-rw-r--r-- | fs/xfs/xfs_bmap_util.c | 2 | ||||
-rw-r--r-- | fs/xfs/xfs_file.c | 4 | ||||
-rw-r--r-- | fs/xfs/xfs_inode.c | 17 | ||||
-rw-r--r-- | fs/xfs/xfs_inode.h | 1 |
4 files changed, 5 insertions, 19 deletions
diff --git a/fs/xfs/xfs_bmap_util.c b/fs/xfs/xfs_bmap_util.c index 5887e41c0323..2f32d7ee1411 100644 --- a/fs/xfs/xfs_bmap_util.c +++ b/fs/xfs/xfs_bmap_util.c | |||
@@ -737,7 +737,7 @@ xfs_getbmap( | |||
737 | out_free_map: | 737 | out_free_map: |
738 | kmem_free(map); | 738 | kmem_free(map); |
739 | out_unlock_ilock: | 739 | out_unlock_ilock: |
740 | xfs_iunlock_map_shared(ip, lock); | 740 | xfs_iunlock(ip, lock); |
741 | out_unlock_iolock: | 741 | out_unlock_iolock: |
742 | xfs_iunlock(ip, XFS_IOLOCK_SHARED); | 742 | xfs_iunlock(ip, XFS_IOLOCK_SHARED); |
743 | 743 | ||
diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c index 52c91e143725..349bfa28aa3d 100644 --- a/fs/xfs/xfs_file.c +++ b/fs/xfs/xfs_file.c | |||
@@ -1294,7 +1294,7 @@ out: | |||
1294 | offset = vfs_setpos(file, offset, inode->i_sb->s_maxbytes); | 1294 | offset = vfs_setpos(file, offset, inode->i_sb->s_maxbytes); |
1295 | 1295 | ||
1296 | out_unlock: | 1296 | out_unlock: |
1297 | xfs_iunlock_map_shared(ip, lock); | 1297 | xfs_iunlock(ip, lock); |
1298 | 1298 | ||
1299 | if (error) | 1299 | if (error) |
1300 | return -error; | 1300 | return -error; |
@@ -1402,7 +1402,7 @@ out: | |||
1402 | offset = vfs_setpos(file, offset, inode->i_sb->s_maxbytes); | 1402 | offset = vfs_setpos(file, offset, inode->i_sb->s_maxbytes); |
1403 | 1403 | ||
1404 | out_unlock: | 1404 | out_unlock: |
1405 | xfs_iunlock_map_shared(ip, lock); | 1405 | xfs_iunlock(ip, lock); |
1406 | 1406 | ||
1407 | if (error) | 1407 | if (error) |
1408 | return -error; | 1408 | return -error; |
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c index 001aa893ed59..967f90625eae 100644 --- a/fs/xfs/xfs_inode.c +++ b/fs/xfs/xfs_inode.c | |||
@@ -88,8 +88,7 @@ xfs_get_extsz_hint( | |||
88 | * have been read in yet, and only lock the inode exclusively if they have not. | 88 | * have been read in yet, and only lock the inode exclusively if they have not. |
89 | * | 89 | * |
90 | * The function returns a value which should be given to the corresponding | 90 | * The function returns a value which should be given to the corresponding |
91 | * xfs_iunlock_map_shared(). This value is the mode in which the lock was | 91 | * xfs_iunlock() call. |
92 | * actually taken. | ||
93 | */ | 92 | */ |
94 | uint | 93 | uint |
95 | xfs_ilock_map_shared( | 94 | xfs_ilock_map_shared( |
@@ -110,18 +109,6 @@ xfs_ilock_map_shared( | |||
110 | } | 109 | } |
111 | 110 | ||
112 | /* | 111 | /* |
113 | * This is simply the unlock routine to go with xfs_ilock_map_shared(). | ||
114 | * All it does is call xfs_iunlock() with the given lock_mode. | ||
115 | */ | ||
116 | void | ||
117 | xfs_iunlock_map_shared( | ||
118 | xfs_inode_t *ip, | ||
119 | unsigned int lock_mode) | ||
120 | { | ||
121 | xfs_iunlock(ip, lock_mode); | ||
122 | } | ||
123 | |||
124 | /* | ||
125 | * The xfs inode contains 2 locks: a multi-reader lock called the | 112 | * The xfs inode contains 2 locks: a multi-reader lock called the |
126 | * i_iolock and a multi-reader lock called the i_lock. This routine | 113 | * i_iolock and a multi-reader lock called the i_lock. This routine |
127 | * allows either or both of the locks to be obtained. | 114 | * allows either or both of the locks to be obtained. |
@@ -590,7 +577,7 @@ xfs_lookup( | |||
590 | 577 | ||
591 | lock_mode = xfs_ilock_map_shared(dp); | 578 | lock_mode = xfs_ilock_map_shared(dp); |
592 | error = xfs_dir_lookup(NULL, dp, name, &inum, ci_name); | 579 | error = xfs_dir_lookup(NULL, dp, name, &inum, ci_name); |
593 | xfs_iunlock_map_shared(dp, lock_mode); | 580 | xfs_iunlock(dp, lock_mode); |
594 | 581 | ||
595 | if (error) | 582 | if (error) |
596 | goto out; | 583 | goto out; |
diff --git a/fs/xfs/xfs_inode.h b/fs/xfs/xfs_inode.h index 9e6efccbae04..5e2bd17cf2be 100644 --- a/fs/xfs/xfs_inode.h +++ b/fs/xfs/xfs_inode.h | |||
@@ -338,7 +338,6 @@ void xfs_iunlock(xfs_inode_t *, uint); | |||
338 | void xfs_ilock_demote(xfs_inode_t *, uint); | 338 | void xfs_ilock_demote(xfs_inode_t *, uint); |
339 | int xfs_isilocked(xfs_inode_t *, uint); | 339 | int xfs_isilocked(xfs_inode_t *, uint); |
340 | uint xfs_ilock_map_shared(xfs_inode_t *); | 340 | uint xfs_ilock_map_shared(xfs_inode_t *); |
341 | void xfs_iunlock_map_shared(xfs_inode_t *, uint); | ||
342 | int xfs_ialloc(struct xfs_trans *, xfs_inode_t *, umode_t, | 341 | int xfs_ialloc(struct xfs_trans *, xfs_inode_t *, umode_t, |
343 | xfs_nlink_t, xfs_dev_t, prid_t, int, | 342 | xfs_nlink_t, xfs_dev_t, prid_t, int, |
344 | struct xfs_buf **, xfs_inode_t **); | 343 | struct xfs_buf **, xfs_inode_t **); |