Messages in this thread Patch in this message | | | From | Miklos Szeredi <> | Subject | [PATCH 12/34] vfs: do_dentry_open(): don't put filp | Date | Thu, 5 Apr 2012 16:58:38 +0200 |
| |
From: Miklos Szeredi <mszeredi@suse.cz>
Move put_filp() out to __dentry_open(), the only caller now.
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> --- fs/open.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/fs/open.c b/fs/open.c index 971b474..e1448cd 100644 --- a/fs/open.c +++ b/fs/open.c @@ -737,7 +737,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); @@ -755,6 +754,8 @@ static struct file *__dentry_open(struct dentry *dentry, struct vfsmount *mnt, fput(res); res = ERR_PTR(error); } + } else { + put_filp(f); } return res; } -- 1.7.7
| |