diff options
author | Michael Halcrow <mhalcrow@us.ibm.com> | 2007-02-28 23:12:57 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-03-01 17:53:38 -0500 |
commit | 65dc8145711d1c20aecbb1a8a4a518f7c68611b8 (patch) | |
tree | c3b24591f88ec9ef5b5b10a767b1cdb9500a5668 /fs/ecryptfs | |
parent | 1ed6d896de3a57bdfb38cffaa748612f112c2a75 (diff) |
[PATCH] eCryptfs: no path_release() after path_lookup() error
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>
Diffstat (limited to 'fs/ecryptfs')
-rw-r--r-- | fs/ecryptfs/main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ecryptfs/main.c b/fs/ecryptfs/main.c index 80044d196fe0..812427e6805c 100644 --- a/fs/ecryptfs/main.c +++ b/fs/ecryptfs/main.c | |||
@@ -487,7 +487,7 @@ static int ecryptfs_read_super(struct super_block *sb, const char *dev_name) | |||
487 | rc = path_lookup(dev_name, LOOKUP_FOLLOW, &nd); | 487 | rc = path_lookup(dev_name, LOOKUP_FOLLOW, &nd); |
488 | if (rc) { | 488 | if (rc) { |
489 | ecryptfs_printk(KERN_WARNING, "path_lookup() failed\n"); | 489 | ecryptfs_printk(KERN_WARNING, "path_lookup() failed\n"); |
490 | goto out_free; | 490 | goto out; |
491 | } | 491 | } |
492 | lower_root = nd.dentry; | 492 | lower_root = nd.dentry; |
493 | if (!lower_root->d_inode) { | 493 | if (!lower_root->d_inode) { |