From: Al Viro Date: Sat, 9 Jul 2011 00:57:47 +0000 (-0400) Subject: deuglify squashfs_lookup() X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=0c1aa9a952c3608eb17bf990466f1491d1ee8b6c;p=~shefty%2Frdma-dev.git deuglify squashfs_lookup() d_splice_alias(NULL, dentry) is equivalent to d_add(dentry, NULL), NULL so no need for that if (inode) ... in there (or ERR_PTR(0), for that matter) Signed-off-by: Al Viro --- diff --git a/fs/squashfs/namei.c b/fs/squashfs/namei.c index 4bc63ac64bc..51b36958492 100644 --- a/fs/squashfs/namei.c +++ b/fs/squashfs/namei.c @@ -232,10 +232,7 @@ static struct dentry *squashfs_lookup(struct inode *dir, struct dentry *dentry, exit_lookup: kfree(dire); - if (inode) - return d_splice_alias(inode, dentry); - d_add(dentry, inode); - return ERR_PTR(0); + return d_splice_alias(inode, dentry); data_error: err = -EIO;