Skip to content

Commit 652efde

Browse files
Christoph Hellwigbrauner
authored andcommitted
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>
1 parent f508057 commit 652efde

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

fs/xfs/xfs_file.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1243,7 +1243,9 @@ xfs_dir_open(
12431243
unsigned int mode;
12441244
int error;
12451245

1246-
error = xfs_file_open(inode, file);
1246+
if (xfs_is_shutdown(ip->i_mount))
1247+
return -EIO;
1248+
error = generic_file_open(inode, file);
12471249
if (error)
12481250
return error;
12491251

0 commit comments

Comments
 (0)