io_uring: inline io_uring_attempt_task_drop()

A simple preparation change inlining io_uring_attempt_task_drop() into
io_uring_flush().

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>

authored by Pavel Begunkov and committed by Jens Axboe 4f793dc4 55e6ac1e

+11 -18
+11 -18
fs/io_uring.c
··· 8964 fput(file); 8965 } 8966 8967 - /* 8968 - * Drop task note for this file if we're the only ones that hold it after 8969 - * pending fput() 8970 - */ 8971 - static void io_uring_attempt_task_drop(struct file *file) 8972 - { 8973 - if (!current->io_uring) 8974 - return; 8975 - /* 8976 - * fput() is pending, will be 2 if the only other ref is our potential 8977 - * task file note. If the task is exiting, drop regardless of count. 8978 - */ 8979 - if (fatal_signal_pending(current) || (current->flags & PF_EXITING) || 8980 - atomic_long_read(&file->f_count) == 2) 8981 - io_uring_del_task_file(file); 8982 - } 8983 - 8984 static void io_uring_remove_task_files(struct io_uring_task *tctx) 8985 { 8986 struct file *file; ··· 9055 9056 static int io_uring_flush(struct file *file, void *data) 9057 { 9058 - io_uring_attempt_task_drop(file); 9059 return 0; 9060 } 9061
··· 8964 fput(file); 8965 } 8966 8967 static void io_uring_remove_task_files(struct io_uring_task *tctx) 8968 { 8969 struct file *file; ··· 9072 9073 static int io_uring_flush(struct file *file, void *data) 9074 { 9075 + if (!current->io_uring) 9076 + return 0; 9077 + 9078 + /* 9079 + * fput() is pending, will be 2 if the only other ref is our potential 9080 + * task file note. If the task is exiting, drop regardless of count. 9081 + */ 9082 + if (fatal_signal_pending(current) || (current->flags & PF_EXITING) || 9083 + atomic_long_read(&file->f_count) == 2) 9084 + io_uring_del_task_file(file); 9085 + 9086 return 0; 9087 } 9088