Skip to content

Commit 53cfd5c

Browse files
Christoph Hellwigaxboe
authored andcommitted
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>
1 parent b9a6c94 commit 53cfd5c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

io_uring/io_uring.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1773,10 +1773,9 @@ static void io_iopoll_req_issued(struct io_kiocb *req, unsigned int issue_flags)
17731773
*/
17741774
unsigned int io_file_get_flags(struct file *file)
17751775
{
1776-
umode_t mode = file_inode(file)->i_mode;
17771776
unsigned int res = 0;
17781777

1779-
if (S_ISREG(mode))
1778+
if (S_ISREG(file_inode(file)->i_mode))
17801779
res |= FFS_ISREG;
17811780
if ((file->f_flags & O_NONBLOCK) || (file->f_mode & FMODE_NOWAIT))
17821781
res |= FFS_NOWAIT;

0 commit comments

Comments
 (0)