diff options
author | Christoph Hellwig <hch@lst.de> | 2022-01-24 10:10:53 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-02-02 15:49:59 +0100 |
commit | 53db984e004c7116ce69e2f4a163664453336ae1 (patch) | |
tree | 61bb0a5aeb27d9c456aae35a8831d025bb56f3bc /drivers/md/dm-crypt.c | |
parent | ntfs3: remove ntfs_alloc_bio (diff) | |
download | linux-53db984e004c7116ce69e2f4a163664453336ae1.tar.xz linux-53db984e004c7116ce69e2f4a163664453336ae1.zip |
dm: bio_alloc can't fail if it is allowed to sleep
Remove handling of NULL returns from sleeping bio_alloc calls given that
those can't fail.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20220124091107.642561-6-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/md/dm-crypt.c')
-rw-r--r-- | drivers/md/dm-crypt.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c index d4ae31558826..20abe3486aba 100644 --- a/drivers/md/dm-crypt.c +++ b/drivers/md/dm-crypt.c @@ -1673,9 +1673,6 @@ retry: mutex_lock(&cc->bio_alloc_lock); clone = bio_alloc_bioset(GFP_NOIO, nr_iovecs, &cc->bs); - if (!clone) - goto out; - clone_init(io, clone); remaining_size = size; @@ -1702,7 +1699,7 @@ retry: bio_put(clone); clone = NULL; } -out: + if (unlikely(gfp_mask & __GFP_DIRECT_RECLAIM)) mutex_unlock(&cc->bio_alloc_lock); |