summaryrefslogtreecommitdiffstats
path: root/fs/file.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2022-06-05 14:01:42 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2022-06-05 15:03:03 -0400
commit40a1926022d128057376d35167128a7c74e3dca4 (patch)
treeb58c10d4ef49365fece9ccd5e49974ce8e03d747 /fs/file.c
parent6319194ec57b0452dcda4589d24c4e7db299c5bf (diff)
downloadlinux-40a1926022d128057376d35167128a7c74e3dca4.tar.gz
linux-40a1926022d128057376d35167128a7c74e3dca4.tar.bz2
linux-40a1926022d128057376d35167128a7c74e3dca4.zip
fix the breakage in close_fd_get_file() calling conventions change
It used to grab an extra reference to struct file rather than just transferring to caller the one it had removed from descriptor table. New variant doesn't, and callers need to be adjusted. Reported-and-tested-by: syzbot+47dd250f527cb7bebf24@syzkaller.appspotmail.com Fixes: 6319194ec57b ("Unify the primitives for file descriptor closing") Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/file.c')
-rw-r--r--fs/file.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/file.c b/fs/file.c
index dd6692048f4f..3bcc1ecc314a 100644
--- a/fs/file.c
+++ b/fs/file.c
@@ -800,8 +800,7 @@ struct file *__close_fd_get_file(unsigned int fd)
/*
* variant of close_fd that gets a ref on the file for later fput.
- * The caller must ensure that filp_close() called on the file, and then
- * an fput().
+ * The caller must ensure that filp_close() called on the file.
*/
struct file *close_fd_get_file(unsigned int fd)
{