From 9879b8472635df547295e5019abbb422108b8925 Mon Sep 17 00:00:00 2001 From: Miklos Szeredi Date: Mon, 21 May 2012 17:30:16 +0200 Subject: [PATCH] --- yaml --- r: 310065 b: refs/heads/master c: 78f71eff3c274f3907f4aa1bbe3267281ba1c603 h: refs/heads/master i: 310063: 25f741023997fdd87e123e2ee91f399ce77a8856 v: v3 --- [refs] | 2 +- trunk/fs/open.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 0e7103717d18..bca724977f39 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 90ad1a8ecb9bfd5ff4503ac42cd049a97643ee51 +refs/heads/master: 78f71eff3c274f3907f4aa1bbe3267281ba1c603 diff --git a/trunk/fs/open.c b/trunk/fs/open.c index 9daa1cea52fc..511c548b0997 100644 --- a/trunk/fs/open.c +++ b/trunk/fs/open.c @@ -747,7 +747,6 @@ static struct file *do_dentry_open(struct dentry *dentry, struct vfsmount *mnt, 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; }