Skip to content

Commit 94c8431

Browse files
Christoph HellwigJaegeuk Kim
authored andcommitted
f2fs: set FMODE_CAN_ODIRECT instead of a dummy direct_IO method
Since commit a2ad63d ("VFS: add FMODE_CAN_ODIRECT file flag") file systems can just set the FMODE_CAN_ODIRECT flag at open time instead of wiring up a dummy direct_IO method to indicate support for direct I/O. Do that for f2fs so that noop_direct_IO can eventually be removed. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
1 parent f240d3a commit 94c8431

2 files changed

Lines changed: 1 addition & 1 deletion

File tree

fs/f2fs/data.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4129,7 +4129,6 @@ const struct address_space_operations f2fs_dblock_aops = {
41294129
.migrate_folio = filemap_migrate_folio,
41304130
.invalidate_folio = f2fs_invalidate_folio,
41314131
.release_folio = f2fs_release_folio,
4132-
.direct_IO = noop_direct_IO,
41334132
.bmap = f2fs_bmap,
41344133
.swap_activate = f2fs_swap_activate,
41354134
.swap_deactivate = f2fs_swap_deactivate,

fs/f2fs/file.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -547,6 +547,7 @@ static int f2fs_file_open(struct inode *inode, struct file *filp)
547547
return err;
548548

549549
filp->f_mode |= FMODE_NOWAIT | FMODE_BUF_RASYNC;
550+
filp->f_mode |= FMODE_CAN_ODIRECT;
550551

551552
return dquot_file_open(inode, filp);
552553
}

0 commit comments

Comments
 (0)