btrfs: set FMODE_CAN_ODIRECT instead of a dummy direct_IO method
authorChristoph Hellwig <hch@lst.de>
Thu, 8 Jun 2023 09:11:33 +0000 (11:11 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 19 Jun 2023 11:59:38 +0000 (13:59 +0200)
commitf02c75e630f09ff4906b0839ed0eaa37c2316132
tree09b3c04644d7329ef6d345529ba4331a45414ae8
parentaadb164bdd5cd7e6c139f2fd5c696ee470cd95d4
btrfs: 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 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>
fs/btrfs/file.c
fs/btrfs/inode.c