xfs: remove xfs_iput_new
PATCH 1/1 xfs: remove xfs_iput_new
We never get an i_mode of 0 or a locked VFS inode until we pass in the XFS_IGET_CREATE flag to xfs_iget, which makes xfs_iput_new equivalent to xfs_iput for the only caller.
fs/xfs/linux-2.6/xfs_export.c +1 -1
@@ -148,7 +148,7 @@ xfs_nfs_get_inode( }if (ip->i_d.di_gen != generation) { -xfs_iput_new (ip,XFS_ILOCK_SHARED ); +xfs_iput (ip,XFS_ILOCK_SHARED );return ERR_PTR (-ENOENT ); }
fs/xfs/xfs_iget.c +0 -23
@@ -439,29 +439,6 @@ xfs_iput(xfs_inode_t *ip, }/* -* Special iput for brand-new inodes that are still locked -*/ -void -xfs_iput_new ( -xfs_inode_t *ip, -uint lock_flags) -{ -struct inode *inode =VFS_I (ip); - -xfs_itrace_entry (ip); - -if ((ip->i_d.di_mode ==0 )) { -ASSERT (!xfs_iflags_test (ip,XFS_IRECLAIMABLE )); -make_bad_inode (inode); - } -if (inode->i_state &I_NEW ) -unlock_new_inode (inode); -if (lock_flags) -xfs_iunlock (ip, lock_flags); -IRELE (ip); -} - -/* * This is called free all the memory associated with an inode. * It must free the inode itself and any buffers allocated for * if_extents/if_data and if_broot. It must also free the lock
fs/xfs/xfs_inode.h +0 -1
@@ -444,7 +444,6 @@ static inline void xfs_ifunlock(xfs_inodint xfs_iget (struct xfs_mount *,struct xfs_trans *,xfs_ino_t ,uint ,uint ,xfs_inode_t **,xfs_daddr_t );void xfs_iput (xfs_inode_t *,uint ); -void xfs_iput_new (xfs_inode_t *,uint );void xfs_ilock (xfs_inode_t *,uint );int xfs_ilock_nowait (xfs_inode_t *,uint );void xfs_iunlock (xfs_inode_t *,uint );
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Quoted 5 lines · Christoph Hellwig
We never get an
i_modeof 0 or a locked VFS inode until we pass in theXFS_IGET_CREATEflag toxfs_iget, which makesxfs_iput_newequivalent toxfs_iputfor the only caller.Signed-off-by Christoph Hellwig <[email protected]>
Signature · 7 lines
Dave Chinner [email protected] _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
Quoted 8 lines · Dave Chinner
Quoted 5 lines · Christoph Hellwig
We never get an
i_modeof 0 or a locked VFS inode until we pass in theXFS_IGET_CREATEflag toxfs_iget, which makesxfs_iput_newequivalent toxfs_iputfor the only caller.Signed-off-by Christoph Hellwig <[email protected]>Reviewed-by Dave Chinner <[email protected]>
There's in fact no need to lock the inode at all here, so this can
be replaced with IRELE. I'll send an updated version with my next
batch of patches.
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs