diff options
author | Christoph Hellwig <hch@lst.de> | 2023-06-20 13:32:29 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2023-06-20 09:36:22 -0600 |
commit | 53cfd5cea7f36bac7f3d45de4fea77e0c8d57aee (patch) | |
tree | 16ab2e28f2bdac6a6cd106c40ecf3ebe17c7601d /io_uring | |
parent | b9a6c9459a5aec7bfd9b763554d15148367f1806 (diff) | |
download | lwn-53cfd5cea7f36bac7f3d45de4fea77e0c8d57aee.tar.gz lwn-53cfd5cea7f36bac7f3d45de4fea77e0c8d57aee.zip |
io_uring: remove the mode variable in io_file_get_flags
The variable is only once now, so don't bother with it.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20230620113235.920399-3-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring')
-rw-r--r-- | io_uring/io_uring.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c index 7e735724940f..2d13f636de93 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; |