aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@suse.cz>2012-05-21 11:30:16 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-06-01 12:12:00 -0400
commit78f71eff3c274f3907f4aa1bbe3267281ba1c603 (patch)
tree1ff09317eca03d269fe52b51a5ed23e2cb610e4b /fs
parent90ad1a8ecb9bfd5ff4503ac42cd049a97643ee51 (diff)
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')
-rw-r--r--fs/open.c3
1 files changed, 2 insertions, 1 deletions
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:
747 f->f_path.dentry = NULL; 747 f->f_path.dentry = NULL;
748 f->f_path.mnt = NULL; 748 f->f_path.mnt = NULL;
749cleanup_file: 749cleanup_file:
750 put_filp(f);
751 dput(dentry); 750 dput(dentry);
752 mntput(mnt); 751 mntput(mnt);
753 return ERR_PTR(error); 752 return ERR_PTR(error);
@@ -765,6 +764,8 @@ static struct file *__dentry_open(struct dentry *dentry, struct vfsmount *mnt,
765 fput(res); 764 fput(res);
766 res = ERR_PTR(error); 765 res = ERR_PTR(error);
767 } 766 }
767 } else {
768 put_filp(f);
768 } 769 }
769 return res; 770 return res;
770} 771}