Skip to content

Commit 9dff55e

Browse files
committed
Revert "io_uring: gate REQ_F_ISREG on !S_ANON_INODE as well"
This reverts commit 6f11adc. The problematic commit was fixed in mainline, so the work-around in io_uring can be removed at this point. Anonymous inodes no longer pretend to be regular files after: 1e7ab6f ("anon_inode: rework assertions") Signed-off-by: Jens Axboe <[email protected]>
1 parent fc582cd commit 9dff55e

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
@@ -1666,12 +1666,11 @@ static void io_iopoll_req_issued(struct io_kiocb *req, unsigned int issue_flags)
16661666

16671667
io_req_flags_t io_file_get_flags(struct file *file)
16681668
{
1669-
struct inode *inode = file_inode(file);
16701669
io_req_flags_t res = 0;
16711670

16721671
BUILD_BUG_ON(REQ_F_ISREG_BIT != REQ_F_SUPPORT_NOWAIT_BIT + 1);
16731672

1674-
if (S_ISREG(inode->i_mode) && !(inode->i_flags & S_ANON_INODE))
1673+
if (S_ISREG(file_inode(file)->i_mode))
16751674
res |= REQ_F_ISREG;
16761675
if ((file->f_flags & O_NONBLOCK) || (file->f_mode & FMODE_NOWAIT))
16771676
res |= REQ_F_SUPPORT_NOWAIT;

0 commit comments

Comments
 (0)