Skip to content

Commit 0f41997

Browse files
Christoph Hellwigcmaiolino
authored andcommitted
xfs: don't use __GFP_NOFAIL in xfs_init_fs_context
With enough debug options enabled, struct xfs_mount is larger than 4k and thus NOFAIL allocations won't work for it. xfs_init_fs_context is early in the mount process, and if we really are out of memory there we'd better give up ASAP anyway. Fixes: 7b77b46 ("xfs: use kmem functions for struct xfs_mount") Reported-by: [email protected] Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Darrick J. Wong <[email protected]> Signed-off-by: Carlos Maiolino <[email protected]>
1 parent ca3d643 commit 0f41997

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/xfs/xfs_super.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2227,7 +2227,7 @@ xfs_init_fs_context(
22272227
struct xfs_mount *mp;
22282228
int i;
22292229

2230-
mp = kzalloc(sizeof(struct xfs_mount), GFP_KERNEL | __GFP_NOFAIL);
2230+
mp = kzalloc(sizeof(struct xfs_mount), GFP_KERNEL);
22312231
if (!mp)
22322232
return -ENOMEM;
22332233

0 commit comments

Comments
 (0)