xfs
[Top] [All Lists]

Re: [PATCH 01/11] xfs: no need to lock the inode in xfs_find_handle

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [PATCH 01/11] xfs: no need to lock the inode in xfs_find_handle
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Mon, 9 Dec 2013 09:31:20 +1100
Cc: xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <20131206203128.196574675@xxxxxxxxxxxxxxxxxxxxxx>
References: <20131206203006.914776999@xxxxxxxxxxxxxxxxxxxxxx> <20131206203128.196574675@xxxxxxxxxxxxxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Fri, Dec 06, 2013 at 12:30:07PM -0800, Christoph Hellwig wrote:
> Both the inode number and the generation do not change on a live inode.
> 
> Signed-off-by: Christoph Hellwig <hch@xxxxxx>
> 
> Index: xfs/fs/xfs/xfs_ioctl.c
> ===================================================================
> --- xfs.orig/fs/xfs/xfs_ioctl.c       2013-12-06 19:16:33.819188640 +0100
> +++ xfs/fs/xfs/xfs_ioctl.c    2013-12-06 19:17:04.087188019 +0100
> @@ -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);
>       }

Agreed.

Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx>
-- 
Dave Chinner
david@xxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>