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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Darrick J. Wong <[email protected]> Signed-off-by: Christian Brauner <[email protected]>
1 parent f508057 commit 652efde

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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)