Skip to content

Commit f34fdcd

Browse files
lsgunthliu-song-6
authored andcommitted
md/raid5-ppl: Fix argument order in bio_alloc_bioset()
bio_alloc_bioset() takes a block device, number of vectors, the OP flags, the GFP mask and the bio set. However when the prototype was changed, the callisite in ppl_do_flush() had the OP flags and the GFP flags reversed. This introduced some sparse error: drivers/md/raid5-ppl.c:632:57: warning: incorrect type in argument 3 (different base types) drivers/md/raid5-ppl.c:632:57: expected unsigned int opf drivers/md/raid5-ppl.c:632:57: got restricted gfp_t [usertype] drivers/md/raid5-ppl.c:633:61: warning: incorrect type in argument 4 (different base types) drivers/md/raid5-ppl.c:633:61: expected restricted gfp_t [usertype] gfp_mask drivers/md/raid5-ppl.c:633:61: got unsigned long long The sparse error introduction may not have been reported correctly by 0day due to other work that was cleaning up other sparse errors in this area. Fixes: 609be10 ("block: pass a block_device and opf to bio_alloc_bioset") Cc: stable@vger.kernel.org # 5.18+ Signed-off-by: Logan Gunthorpe <logang@deltatee.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Song Liu <song@kernel.org>
1 parent d0a1803 commit f34fdcd

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/md/raid5-ppl.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -629,9 +629,9 @@ static void ppl_do_flush(struct ppl_io_unit *io)
629629
if (bdev) {
630630
struct bio *bio;
631631

632-
bio = bio_alloc_bioset(bdev, 0, GFP_NOIO,
632+
bio = bio_alloc_bioset(bdev, 0,
633633
REQ_OP_WRITE | REQ_PREFLUSH,
634-
&ppl_conf->flush_bs);
634+
GFP_NOIO, &ppl_conf->flush_bs);
635635
bio->bi_private = io;
636636
bio->bi_end_io = ppl_flush_endio;
637637

0 commit comments

Comments
 (0)