reset = &zones[1];
 
                if (reset && reset->cond != BLK_ZONE_COND_EMPTY) {
+                       unsigned int nofs_flags;
+
                        ASSERT(sb_zone_is_full(reset));
 
+                       nofs_flags = memalloc_nofs_save();
                        ret = blkdev_zone_mgmt(bdev, REQ_OP_ZONE_RESET,
                                               reset->start, reset->len,
-                                              GFP_NOFS);
+                                              GFP_KERNEL);
+                       memalloc_nofs_restore(nofs_flags);
                        if (ret)
                                return ret;
 
                         * explicit ZONE_FINISH is not necessary.
                         */
                        if (zone->wp != zone->start + zone->capacity) {
+                               unsigned int nofs_flags;
                                int ret;
 
+                               nofs_flags = memalloc_nofs_save();
                                ret = blkdev_zone_mgmt(device->bdev,
                                                REQ_OP_ZONE_FINISH, zone->start,
-                                               zone->len, GFP_NOFS);
+                                               zone->len, GFP_KERNEL);
+                               memalloc_nofs_restore(nofs_flags);
                                if (ret)
                                        return ret;
                        }
 
 int btrfs_reset_sb_log_zones(struct block_device *bdev, int mirror)
 {
+       unsigned int nofs_flags;
        sector_t zone_sectors;
        sector_t nr_sectors;
        u8 zone_sectors_shift;
        u32 sb_zone;
        u32 nr_zones;
+       int ret;
 
        zone_sectors = bdev_zone_sectors(bdev);
        zone_sectors_shift = ilog2(zone_sectors);
        if (sb_zone + 1 >= nr_zones)
                return -ENOENT;
 
-       return blkdev_zone_mgmt(bdev, REQ_OP_ZONE_RESET,
-                               zone_start_sector(sb_zone, bdev),
-                               zone_sectors * BTRFS_NR_SB_LOG_ZONES, GFP_NOFS);
+       nofs_flags = memalloc_nofs_save();
+       ret = blkdev_zone_mgmt(bdev, REQ_OP_ZONE_RESET,
+                              zone_start_sector(sb_zone, bdev),
+                              zone_sectors * BTRFS_NR_SB_LOG_ZONES,
+                              GFP_KERNEL);
+       memalloc_nofs_restore(nofs_flags);
+       return ret;
 }
 
 /*
 int btrfs_reset_device_zone(struct btrfs_device *device, u64 physical,
                            u64 length, u64 *bytes)
 {
+       unsigned int nofs_flags;
        int ret;
 
        *bytes = 0;
+       nofs_flags = memalloc_nofs_save();
        ret = blkdev_zone_mgmt(device->bdev, REQ_OP_ZONE_RESET,
                               physical >> SECTOR_SHIFT, length >> SECTOR_SHIFT,
-                              GFP_NOFS);
+                              GFP_KERNEL);
+       memalloc_nofs_restore(nofs_flags);
        if (ret)
                return ret;
 
                struct btrfs_device *device = map->stripes[i].dev;
                const u64 physical = map->stripes[i].physical;
                struct btrfs_zoned_device_info *zinfo = device->zone_info;
+               unsigned int nofs_flags;
 
                if (zinfo->max_active_zones == 0)
                        continue;
 
+               nofs_flags = memalloc_nofs_save();
                ret = blkdev_zone_mgmt(device->bdev, REQ_OP_ZONE_FINISH,
                                       physical >> SECTOR_SHIFT,
                                       zinfo->zone_size >> SECTOR_SHIFT,
-                                      GFP_NOFS);
+                                      GFP_KERNEL);
+               memalloc_nofs_restore(nofs_flags);
 
                if (ret)
                        return ret;