xfs: no need to lock the inode in xfs_find_handle
authorChristoph Hellwig <hch@infradead.org>
Fri, 6 Dec 2013 20:30:07 +0000 (12:30 -0800)
committerBen Myers <bpm@sgi.com>
Wed, 18 Dec 2013 21:34:28 +0000 (15:34 -0600)
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>
fs/xfs/xfs_ioctl.c

index 33ad9a7..518aa56 100644 (file)
@@ -112,15 +112,11 @@ xfs_find_handle(
                memset(&handle.ha_fid, 0, sizeof(handle.ha_fid));
                hsize = sizeof(xfs_fsid_t);
        } else {
-               int             lock_mode;
-
-               lock_mode = xfs_ilock_map_shared(ip);
                handle.ha_fid.fid_len = sizeof(xfs_fid_t) -
                                        sizeof(handle.ha_fid.fid_len);
                handle.ha_fid.fid_pad = 0;
                handle.ha_fid.fid_gen = ip->i_d.di_gen;
                handle.ha_fid.fid_ino = ip->i_ino;
-               xfs_iunlock_map_shared(ip, lock_mode);
 
                hsize = XFS_HSIZE(handle);
        }