diff options
author | Christoph Hellwig <hch@lst.de> | 2023-06-13 04:09:23 +0300 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2023-06-13 04:09:23 +0300 |
commit | b294349993716ca67c8bd2183c7d43c28df481fc (patch) | |
tree | 8e222999120e14e621c7bd66d1b33bf10285f427 /fs/xfs/xfs_file.c | |
parent | 61d7e8274cd84f574e686b24048ebf29bac861cc (diff) | |
download | linux-b294349993716ca67c8bd2183c7d43c28df481fc.tar.xz |
xfs: 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 xfs so that noop_direct_IO can eventually be removed.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'fs/xfs/xfs_file.c')
-rw-r--r-- | fs/xfs/xfs_file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c index aede746541f8..605587fefbd3 100644 --- a/fs/xfs/xfs_file.c +++ b/fs/xfs/xfs_file.c @@ -1172,7 +1172,7 @@ xfs_file_open( if (xfs_is_shutdown(XFS_M(inode->i_sb))) return -EIO; file->f_mode |= FMODE_NOWAIT | FMODE_BUF_RASYNC | FMODE_BUF_WASYNC | - FMODE_DIO_PARALLEL_WRITE; + FMODE_DIO_PARALLEL_WRITE | FMODE_CAN_ODIRECT; return generic_file_open(inode, file); } |