diff mbox series

[2/8] io_uring: remove the mode variable in io_file_get_flags

Message ID 20230620113235.920399-3-hch@lst.de (mailing list archive)
State New
Headers show
Series [1/8] io_uring: remove __io_file_supports_nowait | expand

Commit Message

Christoph Hellwig June 20, 2023, 11:32 a.m. UTC
The variable is only once now, so don't bother with it.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 io_uring/io_uring.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c
index 7e735724940f7f..2d13f636de93c7 100644
--- a/io_uring/io_uring.c
+++ b/io_uring/io_uring.c
@@ -1773,10 +1773,9 @@  static void io_iopoll_req_issued(struct io_kiocb *req, unsigned int issue_flags)
  */
 unsigned int io_file_get_flags(struct file *file)
 {
-	umode_t mode = file_inode(file)->i_mode;
 	unsigned int res = 0;
 
-	if (S_ISREG(mode))
+	if (S_ISREG(file_inode(file)->i_mode))
 		res |= FFS_ISREG;
 	if ((file->f_flags & O_NONBLOCK) || (file->f_mode & FMODE_NOWAIT))
 		res |= FFS_NOWAIT;