2019-05-31 01:09:56 -07:00
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
|
|
|
|
|
2006-05-18 15:09:15 -04:00
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-10-14 16:05:55 +01:00
|
|
|
|
2009-05-22 10:01:55 +01:00
|
|
|
|
|
|
|
|
|
2008-02-12 14:17:27 +00:00
|
|
|
|
|
|
|
|
|
2022-04-30 23:49:17 -04:00
|
|
|
|
2023-10-09 18:49:31 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-05-22 10:01:55 +01:00
|
|
|
|
2007-05-15 15:37:50 +01:00
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
2008-01-28 10:37:35 +00:00
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
|
|
|
|
|
2007-05-15 15:37:50 +01:00
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
2008-11-04 10:05:22 +00:00
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
|
|
|
|
|
2018-10-12 20:07:27 +02:00
|
|
|
|
2007-10-17 08:35:19 +01:00
|
|
|
|
2018-10-12 20:07:27 +02:00
|
|
|
|
2007-10-17 08:35:19 +01:00
|
|
|
|
|
|
|
|
|
2018-10-12 20:07:27 +02:00
|
|
|
|
2007-10-17 08:47:38 +01:00
|
|
|
|
2018-10-12 20:07:27 +02:00
|
|
|
|
2007-10-17 08:47:38 +01:00
|
|
|
|
|
|
|
|
|
2007-05-15 15:37:50 +01:00
|
|
|
|
2006-02-08 11:50:51 +00:00
|
|
|
|
2006-11-01 12:22:46 -05:00
|
|
|
|
2006-02-08 11:50:51 +00:00
|
|
|
|
|
|
|
|
|
2008-02-12 14:17:27 +00:00
|
|
|
|
2006-11-08 15:45:46 -05:00
|
|
|
|
2025-04-24 17:33:53 +02:00
|
|
|
|
2006-11-08 15:45:46 -05:00
|
|
|
|
|
|
|
|
|
2008-02-12 14:17:27 +00:00
|
|
|
|
|
|
|
|
|
2025-04-24 17:33:53 +02:00
|
|
|
|
2008-02-12 14:17:27 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-04-24 17:33:53 +02:00
|
|
|
|
2019-03-06 07:00:43 -07:00
|
|
|
|
2008-02-12 14:17:27 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-05-15 15:37:50 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-06-01 14:11:58 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-08-11 09:53:11 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-08-02 12:05:27 -05:00
|
|
|
|
2010-08-11 09:53:11 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-06-01 14:11:58 +01:00
|
|
|
|
gfs2: Prevent recursive memory reclaim
Function new_inode() returns a new inode with inode->i_mapping->gfp_mask
set to GFP_HIGHUSER_MOVABLE. This value includes the __GFP_FS flag, so
allocations in that address space can recurse into filesystem memory
reclaim. We don't want that to happen because it can consume a
significant amount of stack memory.
Worse than that is that it can also deadlock: for example, in several
places, gfs2_unstuff_dinode() is called inside filesystem transactions.
This calls filemap_grab_folio(), which can allocate a new folio, which
can trigger memory reclaim. If memory reclaim recurses into the
filesystem and starts another transaction, a deadlock will ensue.
To fix these kinds of problems, prevent memory reclaim from recursing
into filesystem code by making sure that the gfp_mask of inode address
spaces doesn't include __GFP_FS.
The "meta" and resource group address spaces were already using GFP_NOFS
as their gfp_mask (which doesn't include __GFP_FS). The default value
of GFP_HIGHUSER_MOVABLE is less restrictive than GFP_NOFS, though. To
avoid being overly limiting, use the default value and only knock off
the __GFP_FS flag. I'm not sure if this will actually make a
difference, but it also shouldn't hurt.
This patch is loosely based on commit ad22c7a043c2 ("xfs: prevent stack
overflows from page cache allocation").
Fixes xfstest generic/273.
Fixes: dc0b9435238c ("gfs: Don't use GFP_NOFS in gfs2_unstuff_dinode")
Reviewed-by: Andrew Price <anprice@redhat.com>
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
2025-11-13 12:05:37 +00:00
|
|
|
|
2023-10-09 18:49:31 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-04-17 22:41:40 +02:00
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
2023-10-09 18:49:31 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
2009-04-07 19:42:17 +02:00
|
|
|
|
|
|
|
|
|
2008-10-14 16:05:55 +01:00
|
|
|
|
2025-07-03 09:36:41 +02:00
|
|
|
|
2023-10-09 18:49:31 +02:00
|
|
|
|
2025-07-03 09:36:41 +02:00
|
|
|
|
2023-10-09 18:49:31 +02:00
|
|
|
|
|
|
|
|
|
2009-01-12 10:43:39 +00:00
|
|
|
|
2009-04-07 19:42:17 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-01-12 10:43:39 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-04-07 19:42:17 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-01-12 10:43:39 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-10-14 16:05:55 +01:00
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
|
|
|
|
|