aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jfs/namei.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2007-10-21 19:42:09 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-22 11:13:20 -0400
commitd425de704334dc2bad64ca6ea2ac20ef33c9e754 (patch)
tree5702b0ee4b47f3fd9423f1dfe5a889f43320a290 /fs/jfs/namei.c
parent05da08048226cefd2ecc5fe925002d3cf849c7dd (diff)
jfs: new export ops
Trivial switch over to the new generic helpers. Signed-off-by: Christoph Hellwig <hch@lst.de> Cc: Neil Brown <neilb@suse.de> Cc: "J. Bruce Fields" <bfields@fieldses.org> Cc: Dave Kleikamp <shaggy@austin.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/jfs/namei.c')
-rw-r--r--fs/jfs/namei.c35
1 files changed, 19 insertions, 16 deletions
diff --git a/fs/jfs/namei.c b/fs/jfs/namei.c
index 932797ba433b..4e0a8493cef6 100644
--- a/fs/jfs/namei.c
+++ b/fs/jfs/namei.c
@@ -20,6 +20,7 @@
20#include <linux/fs.h> 20#include <linux/fs.h>
21#include <linux/ctype.h> 21#include <linux/ctype.h>
22#include <linux/quotaops.h> 22#include <linux/quotaops.h>
23#include <linux/exportfs.h>
23#include "jfs_incore.h" 24#include "jfs_incore.h"
24#include "jfs_superblock.h" 25#include "jfs_superblock.h"
25#include "jfs_inode.h" 26#include "jfs_inode.h"
@@ -1477,13 +1478,10 @@ static struct dentry *jfs_lookup(struct inode *dip, struct dentry *dentry, struc
1477 return dentry; 1478 return dentry;
1478} 1479}
1479 1480
1480struct dentry *jfs_get_dentry(struct super_block *sb, void *vobjp) 1481static struct inode *jfs_nfs_get_inode(struct super_block *sb,
1482 u64 ino, u32 generation)
1481{ 1483{
1482 __u32 *objp = vobjp;
1483 unsigned long ino = objp[0];
1484 __u32 generation = objp[1];
1485 struct inode *inode; 1484 struct inode *inode;
1486 struct dentry *result;
1487 1485
1488 if (ino == 0) 1486 if (ino == 0)
1489 return ERR_PTR(-ESTALE); 1487 return ERR_PTR(-ESTALE);
@@ -1493,20 +1491,25 @@ struct dentry *jfs_get_dentry(struct super_block *sb, void *vobjp)
1493 1491
1494 if (is_bad_inode(inode) || 1492 if (is_bad_inode(inode) ||
1495 (generation && inode->i_generation != generation)) { 1493 (generation && inode->i_generation != generation)) {
1496 result = ERR_PTR(-ESTALE); 1494 iput(inode);
1497 goto out_iput; 1495 return ERR_PTR(-ESTALE);
1498 } 1496 }
1499 1497
1500 result = d_alloc_anon(inode); 1498 return inode;
1501 if (!result) { 1499}
1502 result = ERR_PTR(-ENOMEM);
1503 goto out_iput;
1504 }
1505 return result;
1506 1500
1507 out_iput: 1501struct dentry *jfs_fh_to_dentry(struct super_block *sb, struct fid *fid,
1508 iput(inode); 1502 int fh_len, int fh_type)
1509 return result; 1503{
1504 return generic_fh_to_dentry(sb, fid, fh_len, fh_type,
1505 jfs_nfs_get_inode);
1506}
1507
1508struct dentry *jfs_fh_to_parent(struct super_block *sb, struct fid *fid,
1509 int fh_len, int fh_type)
1510{
1511 return generic_fh_to_parent(sb, fid, fh_len, fh_type,
1512 jfs_nfs_get_inode);
1510} 1513}
1511 1514
1512struct dentry *jfs_get_parent(struct dentry *dentry) 1515struct dentry *jfs_get_parent(struct dentry *dentry)