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; }