diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c index 042329b74c6e..3dcef4bb0427 100644 --- a/drivers/scsi/scsi_scan.c +++ b/drivers/scsi/scsi_scan.c @@ -222,6 +222,7 @@ static int scsi_realloc_sdev_budget_map(struct scsi_device *sdev, bool need_free = false; int ret; struct sbitmap sb_backup; + unsigned int flags; depth = min_t(unsigned int, depth, scsi_device_max_queue_depth(sdev)); @@ -243,10 +244,12 @@ static int scsi_realloc_sdev_budget_map(struct scsi_device *sdev, blk_mq_freeze_queue(sdev->request_queue); sb_backup = sdev->budget_map; } + flags = memalloc_nofs_save(); ret = sbitmap_init_node(&sdev->budget_map, scsi_device_max_queue_depth(sdev), new_shift, GFP_KERNEL, sdev->request_queue->node, false, true); + memalloc_nofs_restore(flags); if (!ret) sbitmap_resize(&sdev->budget_map, depth); diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c index e83d293c3614..573f62ccd01e 100644 --- a/fs/gfs2/ops_fstype.c +++ b/fs/gfs2/ops_fstype.c @@ -839,6 +839,8 @@ static int init_journal(struct gfs2_sbd *sdp, int undo) gfs2_holder_initialized(&sdp->sd_jinode_gh)) gfs2_glock_dq_uninit(&sdp->sd_jinode_gh); fail_journal_gh: + if (ip) + cancel_delayed_work(&ip->i_gl->gl_work); if (!sdp->sd_args.ar_spectator && gfs2_holder_initialized(&sdp->sd_journal_gh)) gfs2_glock_dq_uninit(&sdp->sd_journal_gh);