From: Miklos Szeredi Date: Mon, 21 May 2012 15:30:16 +0000 (+0200) Subject: vfs: do_dentry_open(): don't put filp X-Git-Tag: v3.5-rc1~15^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=78f71eff3c274f3907f4aa1bbe3267281ba1c603;p=platform%2Fkernel%2Flinux-3.10.git vfs: do_dentry_open(): don't put filp Move put_filp() out to __dentry_open(), the only caller now. Signed-off-by: Miklos Szeredi Signed-off-by: Al Viro --- diff --git a/fs/open.c b/fs/open.c index 9daa1ce..511c548 100644 --- a/fs/open.c +++ b/fs/open.c @@ -747,7 +747,6 @@ cleanup_all: f->f_path.dentry = NULL; f->f_path.mnt = NULL; cleanup_file: - put_filp(f); dput(dentry); mntput(mnt); return ERR_PTR(error); @@ -765,6 +764,8 @@ static struct file *__dentry_open(struct dentry *dentry, struct vfsmount *mnt, fput(res); res = ERR_PTR(error); } + } else { + put_filp(f); } return res; }