f2fs: set FMODE_CAN_ODIRECT instead of a dummy direct_IO method
Since commit a2ad63daa88b ("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>
This commit is contained in:
parent
f240d3aaf5
commit
94c8431fb4
@ -4129,7 +4129,6 @@ const struct address_space_operations f2fs_dblock_aops = {
|
|||||||
.migrate_folio = filemap_migrate_folio,
|
.migrate_folio = filemap_migrate_folio,
|
||||||
.invalidate_folio = f2fs_invalidate_folio,
|
.invalidate_folio = f2fs_invalidate_folio,
|
||||||
.release_folio = f2fs_release_folio,
|
.release_folio = f2fs_release_folio,
|
||||||
.direct_IO = noop_direct_IO,
|
|
||||||
.bmap = f2fs_bmap,
|
.bmap = f2fs_bmap,
|
||||||
.swap_activate = f2fs_swap_activate,
|
.swap_activate = f2fs_swap_activate,
|
||||||
.swap_deactivate = f2fs_swap_deactivate,
|
.swap_deactivate = f2fs_swap_deactivate,
|
||||||
|
@ -547,6 +547,7 @@ static int f2fs_file_open(struct inode *inode, struct file *filp)
|
|||||||
return err;
|
return err;
|
||||||
|
|
||||||
filp->f_mode |= FMODE_NOWAIT | FMODE_BUF_RASYNC;
|
filp->f_mode |= FMODE_NOWAIT | FMODE_BUF_RASYNC;
|
||||||
|
filp->f_mode |= FMODE_CAN_ODIRECT;
|
||||||
|
|
||||||
return dquot_file_open(inode, filp);
|
return dquot_file_open(inode, filp);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user