diff options
author | Christoph Hellwig <hch@infradead.org> | 2013-12-06 15:30:07 -0500 |
---|---|---|
committer | Ben Myers <bpm@sgi.com> | 2013-12-18 16:34:28 -0500 |
commit | 30ba7ad54335e4715d3cc9cc8f43cbf1b3535e46 (patch) | |
tree | 1dfe5180129166a78a0ab095c15b9769c415585f /fs/xfs/xfs_ioctl.c | |
parent | f9b395a8ef8f34d19cae2cde361e19c96e097fad (diff) |
xfs: no need to lock the inode in xfs_find_handle
Both the inode number and the generation do not change on a live inode.
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_ioctl.c')
-rw-r--r-- | fs/xfs/xfs_ioctl.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c index 33ad9a77791f..518aa56b8f2e 100644 --- a/fs/xfs/xfs_ioctl.c +++ b/fs/xfs/xfs_ioctl.c | |||
@@ -112,15 +112,11 @@ xfs_find_handle( | |||
112 | memset(&handle.ha_fid, 0, sizeof(handle.ha_fid)); | 112 | memset(&handle.ha_fid, 0, sizeof(handle.ha_fid)); |
113 | hsize = sizeof(xfs_fsid_t); | 113 | hsize = sizeof(xfs_fsid_t); |
114 | } else { | 114 | } else { |
115 | int lock_mode; | ||
116 | |||
117 | lock_mode = xfs_ilock_map_shared(ip); | ||
118 | handle.ha_fid.fid_len = sizeof(xfs_fid_t) - | 115 | handle.ha_fid.fid_len = sizeof(xfs_fid_t) - |
119 | sizeof(handle.ha_fid.fid_len); | 116 | sizeof(handle.ha_fid.fid_len); |
120 | handle.ha_fid.fid_pad = 0; | 117 | handle.ha_fid.fid_pad = 0; |
121 | handle.ha_fid.fid_gen = ip->i_d.di_gen; | 118 | handle.ha_fid.fid_gen = ip->i_d.di_gen; |
122 | handle.ha_fid.fid_ino = ip->i_ino; | 119 | handle.ha_fid.fid_ino = ip->i_ino; |
123 | xfs_iunlock_map_shared(ip, lock_mode); | ||
124 | 120 | ||
125 | hsize = XFS_HSIZE(handle); | 121 | hsize = XFS_HSIZE(handle); |
126 | } | 122 | } |