From a528879399d7fcee0a24dd1665a9012c514a7b8c Mon Sep 17 00:00:00 2001 From: Miklos Szeredi Date: Sat, 5 Mar 2005 16:46:52 +0000 Subject: [PATCH] fix --- kernel/configure.ac | 2 +- kernel/inode.c | 24 ++++++++++-------------- 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/kernel/configure.ac b/kernel/configure.ac index 62c2b2f..a27ceca 100644 --- a/kernel/configure.ac +++ b/kernel/configure.ac @@ -1,4 +1,4 @@ -AC_INIT(fuse-kernel, 2.2) +AC_INIT(fuse-kernel, 2.2.1) AC_CONFIG_HEADERS([config.h]) AC_PROG_INSTALL diff --git a/kernel/inode.c b/kernel/inode.c index f702a4a..d935d58 100644 --- a/kernel/inode.c +++ b/kernel/inode.c @@ -520,34 +520,30 @@ static struct inode *get_root_inode(struct super_block *sb, unsigned mode) #ifdef KERNEL_2_6 static struct dentry *fuse_get_dentry(struct super_block *sb, void *vobjp) { - int err; __u32 *objp = vobjp; unsigned long nodeid = objp[0]; __u32 generation = objp[1]; struct inode *inode; struct dentry *entry; - err = -ESTALE; if (nodeid == 0) - goto error; + return ERR_PTR(-ESTALE); inode = ilookup5(sb, nodeid, fuse_inode_eq, &nodeid); if (!inode) - goto error; - if (inode->i_generation != generation) - goto error_iput; + return ERR_PTR(-ESTALE); + if (inode->i_generation != generation) { + iput(inode); + return ERR_PTR(-ESTALE); + } - err = -ENOMEM; entry = d_alloc_anon(inode); - if (!entry) - goto error_iput; + if (!entry) { + iput(inode); + return ERR_PTR(-ENOMEM); + } return entry; - - error_iput: - iput(inode); - error: - return ERR_PTR(err); } static int fuse_encode_fh(struct dentry *dentry, __u32 *fh, int *max_len, -- 2.30.2