summaryrefslogtreecommitdiff
path: root/fs/f2fs/file.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2023-06-12 07:37:11 +0200
committerJaegeuk Kim <jaegeuk@kernel.org>2023-06-26 06:07:09 -0700
commit94c8431fb46bfbe51bd3eb68687334797af0a221 (patch)
treef8cc2e2e5a2dcbbed9274d85575be5440ae4c6d2 /fs/f2fs/file.c
parentf240d3aaf5a1552ecb75445b47b1ca957d5151d2 (diff)
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>
Diffstat (limited to 'fs/f2fs/file.c')
-rw-r--r--fs/f2fs/file.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index 23c68ee946e5..b8a6267d9800 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -547,6 +547,7 @@ static int f2fs_file_open(struct inode *inode, struct file *filp)
return err;
filp->f_mode |= FMODE_NOWAIT | FMODE_BUF_RASYNC;
+ filp->f_mode |= FMODE_CAN_ODIRECT;
return dquot_file_open(inode, filp);
}