diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2018-07-09 17:14:39 +0200 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2018-07-12 16:04:16 +0200 |
commit | 4d27f3266f14e4d1d13125ce32cb49a40f3122c3 (patch) | |
tree | f8563984e4278fc0ddd68c4bdd277f8179014ef5 /fs/namei.c | |
parent | introduce FMODE_OPENED (diff) | |
download | linux-4d27f3266f14e4d1d13125ce32cb49a40f3122c3.tar.xz linux-4d27f3266f14e4d1d13125ce32cb49a40f3122c3.zip |
fold put_filp() into fput()
Just check FMODE_OPENED in __fput() and be done with that...
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/namei.c')
-rw-r--r-- | fs/namei.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/namei.c b/fs/namei.c index 3cf02804d5ff..503c4b968415 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -3531,7 +3531,7 @@ static struct file *path_openat(struct nameidata *nd, s = path_init(nd, flags); if (IS_ERR(s)) { - put_filp(file); + fput(file); return ERR_CAST(s); } while (!(error = link_path_walk(s, nd)) && @@ -3547,7 +3547,7 @@ static struct file *path_openat(struct nameidata *nd, out2: if (!(opened & FILE_OPENED)) { BUG_ON(!error); - put_filp(file); + fput(file); } if (unlikely(error)) { if (error == -EOPENSTALE) { |