From: Miklos Szeredi Date: Mon, 21 May 2012 15:30:16 +0000 (+0200) Subject: vfs: do_dentry_open(): don't put filp X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=78f71eff3c274f3907f4aa1bbe3267281ba1c603;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.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 9daa1cea52fc..511c548b0997 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; }