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. In addition to that xfs_nfs_get_inode does not even need to lock the inode given that the generation never changes for a life inode, so just pass a 0 lock_flags to xfs_iget and release the inode using IRELE in the error path. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Dave Chinner <dchinner@redhat.com>
This commit is contained in:
committed by
Alex Elder
parent
d2e078c33c
commit
ef35e9255d
@@ -434,29 +434,6 @@ xfs_iput(xfs_inode_t *ip,
|
||||
IRELE(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
|
||||
|
Reference in New Issue
Block a user