]> git.baikalelectronics.ru Git - kernel.git/commit
md/raid5-ppl: Fix argument order in bio_alloc_bioset()
authorLogan Gunthorpe <logang@deltatee.com>
Wed, 8 Jun 2022 16:27:46 +0000 (10:27 -0600)
committerSong Liu <song@kernel.org>
Wed, 15 Jun 2022 17:32:48 +0000 (10:32 -0700)
commit884eab9cc8fb83a2f721bb7ddedc5f75341c3a18
tree37d9a78f340a5c30a1f527aac17e2ead26de9c44
parentd9d271e726243ab4556261f9e71c3e6129bfe898
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: cffdbddd0da9 ("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>
drivers/md/raid5-ppl.c