zonefs: pass GFP_KERNEL to blkdev_zone_mgmt() call
authorJohannes Thumshirn <johannes.thumshirn@wdc.com>
Mon, 29 Jan 2024 07:52:16 +0000 (23:52 -0800)
committerJens Axboe <axboe@kernel.dk>
Mon, 12 Feb 2024 15:41:15 +0000 (08:41 -0700)
Pass GFP_KERNEL instead of GFP_NOFS to the blkdev_zone_mgmt() call in
zonefs_zone_mgmt().

As as zonefs_zone_mgmt() and zonefs_inode_zone_mgmt() are never called
from a place that can recurse back into the filesystem on memory reclaim,
it is save to call blkdev_zone_mgmt() with GFP_KERNEL.

Link: https://lore.kernel.org/all/ZZcgXI46AinlcBDP@casper.infradead.org/
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Acked-by: Damien Le Moal <dlemoal@kernel.org>
Link: https://lore.kernel.org/r/20240128-zonefs_nofs-v3-1-ae3b7c8def61@wdc.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/zonefs/super.c

index 93971742613a399d07fa2cf7e1f88cba61a91956..63fbac018c04550cb5744698620b8ba613828f96 100644 (file)
@@ -113,7 +113,7 @@ static int zonefs_zone_mgmt(struct super_block *sb,
 
        trace_zonefs_zone_mgmt(sb, z, op);
        ret = blkdev_zone_mgmt(sb->s_bdev, op, z->z_sector,
-                              z->z_size >> SECTOR_SHIFT, GFP_NOFS);
+                              z->z_size >> SECTOR_SHIFT, GFP_KERNEL);
        if (ret) {
                zonefs_err(sb,
                           "Zone management operation %s at %llu failed %d\n",