diff options
author | Miklos Szeredi <mszeredi@suse.cz> | 2012-05-21 17:30:16 +0200 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-06-01 12:12:00 -0400 |
commit | 78f71eff3c274f3907f4aa1bbe3267281ba1c603 (patch) | |
tree | 1ff09317eca03d269fe52b51a5ed23e2cb610e4b /fs/open.c | |
parent | 90ad1a8ecb9bfd5ff4503ac42cd049a97643ee51 (diff) | |
download | op-kernel-dev-78f71eff3c274f3907f4aa1bbe3267281ba1c603.zip op-kernel-dev-78f71eff3c274f3907f4aa1bbe3267281ba1c603.tar.gz |
vfs: do_dentry_open(): don't put filp
Move put_filp() out to __dentry_open(), the only caller now.
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/open.c')
-rw-r--r-- | fs/open.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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; } |