summaryrefslogtreecommitdiff
path: root/drivers/md/dm.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2023-03-24 14:20:48 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2023-03-24 14:20:48 -0700
commit5ad4fe9613cb8c202150f5cce5347fc8926c6c01 (patch)
treefd5ef65a02d0ca440236911c23940951f7d01f97 /drivers/md/dm.c
parent83511470af1a734ec47c37957612d2eecf1a2352 (diff)
parentd3aa3e060c4a80827eb801fc448debc9daa7c46b (diff)
Merge tag 'for-6.3/dm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm
Pull device mapper fixes from Mike Snitzer: - Fix DM thin to work as a swap device by using 'limit_swap_bios' DM target flag (initially added to allow swap to dm-crypt) to throttle the amount of outstanding swap bios. - Fix DM crypt soft lockup warnings by calling cond_resched() from the cpu intensive loop in dmcrypt_write(). - Fix DM crypt to not access an uninitialized tasklet. This fix allows for consistent handling of IO completion, by _not_ needlessly punting to a workqueue when tasklets are not needed. - Fix DM core's alloc_dev() initialization for DM stats to check for and propagate alloc_percpu() failure. * tag 'for-6.3/dm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: dm stats: check for and propagate alloc_percpu failure dm crypt: avoid accessing uninitialized tasklet dm crypt: add cond_resched() to dmcrypt_write() dm thin: fix deadlock when swapping to thin device
Diffstat (limited to 'drivers/md/dm.c')
-rw-r--r--drivers/md/dm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index f5cc330bb549..2d0f934ba6e6 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -2097,7 +2097,9 @@ static struct mapped_device *alloc_dev(int minor)
if (!md->pending_io)
goto bad;
- dm_stats_init(&md->stats);
+ r = dm_stats_init(&md->stats);
+ if (r < 0)
+ goto bad;
/* Populate the mapping, nobody knows we exist yet */
spin_lock(&_minor_lock);