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>
This commit is contained in:
Christoph Hellwig 2024-04-23 14:46:08 +02:00 committed by Christian Brauner
parent f50805713a
commit 652efdeca5
No known key found for this signature in database
GPG Key ID: 91C61BC06578DCA2

View File

@ -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;