xfs: don't use __GFP_NOFAIL in xfs_init_fs_context
PATCH v2 1/1 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 7b77b46a6137 ("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]>
---
Changes since v1:
- update commit log for the proper root cause, add Fixes and Reported-by tags.
fs/xfs/xfs_super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/xfs/xfs_super.c +1 -1
@@ -2221,7 +2221,7 @@ xfs_init_fs_context(struct xfs_mount *mp;int i; - mp =kzalloc (sizeof (struct xfs_mount ),GFP_KERNEL | __GFP_NOFAIL); + mp =kzalloc (sizeof (struct xfs_mount ),GFP_KERNEL );if (!mp)return -ENOMEM ;
Signature · 1 line
2.47.3
Quoted 8 lines · Christoph Hellwig
With enough debug options enabled, struct
xfs_mountis larger than 4k and thus NOFAIL allocations won't work for it.
xfs_init_fs_contextis early in the mount process, and if we really are out of memory there we'd better give up ASAP anyway.[...]
Applied to for-next, thanks!
[1/1] xfs: don't use __GFP_NOFAIL in xfs_init_fs_context
commit: 0f41997b1b2b769b73415512d2afaae80630e4fe
Best regards,
Signature · 1 line
Carlos Maiolino <[email protected]>