summaryrefslogtreecommitdiff
path: root/fs/btrfs/file.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2023-06-08 12:11:33 +0300
committerDavid Sterba <dsterba@suse.com>2023-06-19 14:59:38 +0300
commitf02c75e630f09ff4906b0839ed0eaa37c2316132 (patch)
tree09b3c04644d7329ef6d345529ba4331a45414ae8 /fs/btrfs/file.c
parentaadb164bdd5cd7e6c139f2fd5c696ee470cd95d4 (diff)
downloadlinux-f02c75e630f09ff4906b0839ed0eaa37c2316132.tar.xz
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>
Diffstat (limited to 'fs/btrfs/file.c')
-rw-r--r--fs/btrfs/file.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
index f53b7b75092d..392bc7d512a0 100644
--- a/fs/btrfs/file.c
+++ b/fs/btrfs/file.c
@@ -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)