]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] eCryptfs: no path_release() after path_lookup() error
authorMichael Halcrow <mhalcrow@us.ibm.com>
Thu, 1 Mar 2007 04:12:57 +0000 (20:12 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Thu, 1 Mar 2007 22:53:38 +0000 (14:53 -0800)
Dmitriy Monakhov wrote:
> if path_lookup() return non zero code we don't have to worry about
> 'nd' parameter, but ecryptfs_read_super does path_release(&nd) after
> path_lookup has failed, and dentry counter becomes negative

Do not do a path_release after a path_lookup error.

Signed-off-by: Michael Halcrow <mhalcrow@us.ibm.com>
Cc: Dmitriy Monakhov <dmonakhov@openvz.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/ecryptfs/main.c

index 80044d196fe06b7b82ae3c6dc0cacaddc3e1a2f6..812427e6805c99212b3e02cc098a73bd6149961e 100644 (file)
@@ -487,7 +487,7 @@ static int ecryptfs_read_super(struct super_block *sb, const char *dev_name)
        rc = path_lookup(dev_name, LOOKUP_FOLLOW, &nd);
        if (rc) {
                ecryptfs_printk(KERN_WARNING, "path_lookup() failed\n");
-               goto out_free;
+               goto out;
        }
        lower_root = nd.dentry;
        if (!lower_root->d_inode) {