diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2022-06-05 03:52:00 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2022-06-05 03:52:00 +0200 |
commit | dbe0ee46614016146c1b3e1fc063b44333bb2401 (patch) | |
tree | d575d487d306a8f03cceac3f930d7fd53a6079f8 /fs/file_table.c | |
parent | Merge tag '5.19-rc-smb3-client-fixes-part2' of git://git.samba.org/sfrench/ci... (diff) | |
parent | Unify the primitives for file descriptor closing (diff) | |
download | linux-dbe0ee46614016146c1b3e1fc063b44333bb2401.tar.xz linux-dbe0ee46614016146c1b3e1fc063b44333bb2401.zip |
Merge tag 'pull-18-rc1-work.fd' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull file descriptor updates from Al Viro.
- Descriptor handling cleanups
* tag 'pull-18-rc1-work.fd' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
Unify the primitives for file descriptor closing
fs: remove fget_many and fput_many interface
io_uring_enter(): don't leave f.flags uninitialized
Diffstat (limited to 'fs/file_table.c')
-rw-r--r-- | fs/file_table.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/fs/file_table.c b/fs/file_table.c index ada8fe814db9..5424e3a8df5f 100644 --- a/fs/file_table.c +++ b/fs/file_table.c @@ -368,9 +368,9 @@ EXPORT_SYMBOL_GPL(flush_delayed_fput); static DECLARE_DELAYED_WORK(delayed_fput_work, delayed_fput); -void fput_many(struct file *file, unsigned int refs) +void fput(struct file *file) { - if (atomic_long_sub_and_test(refs, &file->f_count)) { + if (atomic_long_dec_and_test(&file->f_count)) { struct task_struct *task = current; if (likely(!in_interrupt() && !(task->flags & PF_KTHREAD))) { @@ -389,11 +389,6 @@ void fput_many(struct file *file, unsigned int refs) } } -void fput(struct file *file) -{ - fput_many(file, 1); -} - /* * synchronous analog of fput(); for kernel threads that might be needed * in some umount() (and thus can't use flush_delayed_fput() without |