OSDN Git Service

fs: avoid fdput() after failed fdget() in vfs_dedupe_file_range()
authorZev Weiss <zev@bewilderbeest.net>
Sat, 14 Apr 2018 06:16:58 +0000 (01:16 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Mon, 16 Apr 2018 03:36:26 +0000 (23:36 -0400)
commit22762711479959754e005f5bb8e6abc37bf9e0ba
tree5d68bdb49a6908d061fe46a1c3c084708a35d286
parent60cc43fc888428bb2f18f08997432d426a243338
fs: avoid fdput() after failed fdget() in vfs_dedupe_file_range()

It's a fairly inconsequential bug, since fdput() won't actually try to
fput() the file due to fd.flags (and thus FDPUT_FPUT) being zero in
the failure case, but most other vfs code takes steps to avoid this.

Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/read_write.c