summaryrefslogtreecommitdiffstats
path: root/fs/xfs/linux-2.6/xfs_export.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2010-06-24 11:51:19 +1000
committerAlex Elder <aelder@sgi.com>2010-07-26 13:16:44 -0500
commitef35e9255d4ed12522e836fbcec861e7306d794a (patch)
tree4ae5b2aef3f8dac9dd44490f6952e359239aa117 /fs/xfs/linux-2.6/xfs_export.c
parentd2e078c33c24f97411b0fdd7cd2173e68125e7e3 (diff)
downloadtalos-obmc-linux-ef35e9255d4ed12522e836fbcec861e7306d794a.tar.gz
talos-obmc-linux-ef35e9255d4ed12522e836fbcec861e7306d794a.zip
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>
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_export.c')
-rw-r--r--fs/xfs/linux-2.6/xfs_export.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/xfs/linux-2.6/xfs_export.c b/fs/xfs/linux-2.6/xfs_export.c
index 09c91325f727..3764d74790ec 100644
--- a/fs/xfs/linux-2.6/xfs_export.c
+++ b/fs/xfs/linux-2.6/xfs_export.c
@@ -29,6 +29,7 @@
#include "xfs_bmap_btree.h"
#include "xfs_inode.h"
#include "xfs_inode_item.h"
+#include "xfs_trace.h"
/*
* Note that we only accept fileids which are long enough rather than allow
@@ -131,8 +132,7 @@ xfs_nfs_get_inode(
* fine and not an indication of a corrupted filesystem as clients can
* send invalid file handles and we have to handle it gracefully..
*/
- error = xfs_iget(mp, NULL, ino, XFS_IGET_UNTRUSTED,
- XFS_ILOCK_SHARED, &ip);
+ error = xfs_iget(mp, NULL, ino, XFS_IGET_UNTRUSTED, 0, &ip);
if (error) {
/*
* EINVAL means the inode cluster doesn't exist anymore.
@@ -147,11 +147,10 @@ xfs_nfs_get_inode(
}
if (ip->i_d.di_gen != generation) {
- xfs_iput_new(ip, XFS_ILOCK_SHARED);
+ IRELE(ip);
return ERR_PTR(-ENOENT);
}
- xfs_iunlock(ip, XFS_ILOCK_SHARED);
return VFS_I(ip);
}
OpenPOWER on IntegriCloud