Skip to content

Commit 8812387

Browse files
Christoph Hellwigdamien-lemoal
authored andcommitted
zonefs: 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 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>
1 parent 16d7fd3 commit 8812387

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/zonefs/file.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,6 @@ const struct address_space_operations zonefs_file_aops = {
181181
.migrate_folio = filemap_migrate_folio,
182182
.is_partially_uptodate = iomap_is_partially_uptodate,
183183
.error_remove_page = generic_error_remove_page,
184-
.direct_IO = noop_direct_IO,
185184
.swap_activate = zonefs_swap_activate,
186185
};
187186

@@ -815,6 +814,7 @@ static int zonefs_file_open(struct inode *inode, struct file *file)
815814
{
816815
int ret;
817816

817+
file->f_mode |= FMODE_CAN_ODIRECT;
818818
ret = generic_file_open(inode, file);
819819
if (ret)
820820
return ret;

0 commit comments

Comments
 (0)