summaryrefslogtreecommitdiff
path: root/fs/zonefs/file.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2023-06-12 07:35:15 +0200
committerDamien Le Moal <dlemoal@kernel.org>2023-06-14 08:51:18 +0900
commit8812387d056957355ef1d026cd38bed3830649db (patch)
treebacecb7c9a68add8007909f2e50100d0fc96f1c3 /fs/zonefs/file.c
parent16d7fd3cfa7259729c8e2a7620bd5b4ca480da85 (diff)
zonefs: 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 zonefs so that noop_direct_IO can eventually be removed. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
Diffstat (limited to 'fs/zonefs/file.c')
-rw-r--r--fs/zonefs/file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/zonefs/file.c b/fs/zonefs/file.c
index c34ec5b54053..d11b08d5e4d1 100644
--- a/fs/zonefs/file.c
+++ b/fs/zonefs/file.c
@@ -181,7 +181,6 @@ const struct address_space_operations zonefs_file_aops = {
.migrate_folio = filemap_migrate_folio,
.is_partially_uptodate = iomap_is_partially_uptodate,
.error_remove_page = generic_error_remove_page,
- .direct_IO = noop_direct_IO,
.swap_activate = zonefs_swap_activate,
};
@@ -815,6 +814,7 @@ static int zonefs_file_open(struct inode *inode, struct file *file)
{
int ret;
+ file->f_mode |= FMODE_CAN_ODIRECT;
ret = generic_file_open(inode, file);
if (ret)
return ret;