Commit 53cfd5ce authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jens Axboe

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: default avatarChristoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20230620113235.920399-3-hch@lst.deSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent b9a6c945
...@@ -1773,10 +1773,9 @@ static void io_iopoll_req_issued(struct io_kiocb *req, unsigned int issue_flags) ...@@ -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) unsigned int io_file_get_flags(struct file *file)
{ {
umode_t mode = file_inode(file)->i_mode;
unsigned int res = 0; unsigned int res = 0;
if (S_ISREG(mode)) if (S_ISREG(file_inode(file)->i_mode))
res |= FFS_ISREG; res |= FFS_ISREG;
if ((file->f_flags & O_NONBLOCK) || (file->f_mode & FMODE_NOWAIT)) if ((file->f_flags & O_NONBLOCK) || (file->f_mode & FMODE_NOWAIT))
res |= FFS_NOWAIT; res |= FFS_NOWAIT;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment