mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 04:31:50 +00:00
btrfs: set FMODE_CAN_ODIRECT instead of a dummy direct_IO method
Since commit a2ad63daa8
("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 btrfs so that noop_direct_IO can eventually be removed.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
aadb164bdd
commit
f02c75e630
@ -3700,7 +3700,8 @@ static int btrfs_file_open(struct inode *inode, struct file *filp)
|
||||
{
|
||||
int ret;
|
||||
|
||||
filp->f_mode |= FMODE_NOWAIT | FMODE_BUF_RASYNC | FMODE_BUF_WASYNC;
|
||||
filp->f_mode |= FMODE_NOWAIT | FMODE_BUF_RASYNC | FMODE_BUF_WASYNC |
|
||||
FMODE_CAN_ODIRECT;
|
||||
|
||||
ret = fsverity_file_open(inode, filp);
|
||||
if (ret)
|
||||
|
@ -11011,7 +11011,6 @@ static const struct address_space_operations btrfs_aops = {
|
||||
.read_folio = btrfs_read_folio,
|
||||
.writepages = btrfs_writepages,
|
||||
.readahead = btrfs_readahead,
|
||||
.direct_IO = noop_direct_IO,
|
||||
.invalidate_folio = btrfs_invalidate_folio,
|
||||
.release_folio = btrfs_release_folio,
|
||||
.migrate_folio = btrfs_migrate_folio,
|
||||
|
Loading…
Reference in New Issue
Block a user