diff options
author | Christoph Hellwig <hch@lst.de> | 2024-04-23 15:46:08 +0300 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2024-04-24 15:46:51 +0300 |
commit | 652efdeca5b142ee9c5197f45f64fc3d427d4b08 (patch) | |
tree | 8de35fb946bd740e445f07fbbef3af1317d1db43 /fs/xfs/xfs_file.c | |
parent | f50805713a6e8bd58bb69386c60f5c922b882016 (diff) | |
download | linux-652efdeca5b142ee9c5197f45f64fc3d427d4b08.tar.xz |
xfs: don't call xfs_file_open from xfs_dir_open
Directories do not support direct I/O and thus no non-blocking direct
I/O either. Open code the shutdown check and call to generic_file_open
instead.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20240423124608.537794-4-hch@lst.de
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/xfs/xfs_file.c')
-rw-r--r-- | fs/xfs/xfs_file.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c index 4415d0f3bbc5..2ce302b4885f 100644 --- a/fs/xfs/xfs_file.c +++ b/fs/xfs/xfs_file.c @@ -1243,7 +1243,9 @@ xfs_dir_open( unsigned int mode; int error; - error = xfs_file_open(inode, file); + if (xfs_is_shutdown(ip->i_mount)) + return -EIO; + error = generic_file_open(inode, file); if (error) return error; |