[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20081117185834.GA26417@bombadil.infradead.org>
Date: Mon, 17 Nov 2008 13:58:34 -0500
From: Kyle McMartin <kyle@...hat.com>
To: phillip.lougher@...il.com
Cc: linux-kernel@...r.kernel.org
Subject: [PATCH squashfs] fix squashfs for d_alloc_anon removal
Signed-off-by: Kyle McMartin <kyle@...hat.com>
diff --git a/fs/squashfs/inode.c b/fs/squashfs/inode.c
index 0c0173c..335ba3e 100644
--- a/fs/squashfs/inode.c
+++ b/fs/squashfs/inode.c
@@ -639,29 +639,14 @@ static struct dentry *squashfs_export_iget(struct super_block *s,
{
squashfs_inode_t inode;
struct inode *i;
- struct dentry *dentry;
+ struct dentry *dentry = ERR_PTR(-ENOENT);
TRACE("Entered squashfs_export_iget\n");
inode = squashfs_inode_lookup(s, inode_number);
- if(inode == SQUASHFS_INVALID_BLK) {
- dentry = ERR_PTR(-ENOENT);
- goto failure;
- }
-
- i = squashfs_iget(s, inode, inode_number);
- if(i == NULL) {
- dentry = ERR_PTR(-EACCES);
- goto failure;
- }
-
- dentry = d_alloc_anon(i);
- if (dentry == NULL) {
- iput(i);
- dentry = ERR_PTR(-ENOMEM);
- }
+ if (inode != SQUASHFS_INVALID_BLK)
+ dentry = d_obtain_alias(squashfs_iget(s, inode, inode_number));
-failure:
return dentry;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists