diff options
author | Gou Hao <[email protected]> | 2023-12-14 23:14:58 +0800 |
---|---|---|
committer | Song Liu <[email protected]> | 2023-12-15 00:45:37 -0800 |
commit | af140f806ae2679f9dba48ea0f5811da83854eb6 (patch) | |
tree | 234d05d7b498671dbb3ed1d4c7d159a6ef02dec3 | |
parent | fa2bbff7b0b4e211fec5e5686ef96350690597b5 (diff) |
md/raid1: remove unnecessary null checking
If %__GFP_DIRECT_RECLAIM is set then bio_alloc_bioset will always
be able to allocate a bio. See comment of bio_alloc_bioset.
Signed-off-by: Gou Hao <[email protected]>
Signed-off-by: Song Liu <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
-rw-r--r-- | drivers/md/raid1.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c index 9348f1709512..19c9bf0060ae 100644 --- a/drivers/md/raid1.c +++ b/drivers/md/raid1.c @@ -1124,8 +1124,6 @@ static void alloc_behind_master_bio(struct r1bio *r1_bio, behind_bio = bio_alloc_bioset(NULL, vcnt, 0, GFP_NOIO, &r1_bio->mddev->bio_set); - if (!behind_bio) - return; /* discard op, we don't support writezero/writesame yet */ if (!bio_has_data(bio)) { |