linux-next: build failure after merge of the block tree

Stephen Rothwell
2019-01-16T02:56:00Z

[-- Attachment #1: Type: text/plain, Size: 2725 bytes --]

Hi all,

After merging the block tree, today's linux-next build (x86_64
allmodconfig) failed like this:

fs/verity/verify.c: In function 'fsverity_verify_bio':
fs/verity/verify.c:272:38: error: macro "bio_for_each_segment_all" requires 4 arguments, but only 3 given
bio_for_each_segment_all(bv, bio, i)
^
fs/verity/verify.c:272:3: error: unknown type name 'bio_for_each_segment_all'
bio_for_each_segment_all(bv, bio, i)
^~~~~~~~~~~~~~~~~~~~~~~~
fs/verity/verify.c:273:19: error: expected ')' before '->' token
SetPageError(bv->bv_page);
^~
)
fs/verity/verify.c:277:37: error: macro "bio_for_each_segment_all" requires 4 arguments, but only 3 given
bio_for_each_segment_all(bv, bio, i) {
^
fs/verity/verify.c:277:2: error: 'bio_for_each_segment_all' undeclared (first use in this function); did you mean 'bio_first_page_all'?
bio_for_each_segment_all(bv, bio, i) {
^~~~~~~~~~~~~~~~~~~~~~~~
bio_first_page_all
fs/verity/verify.c:277:2: note: each undeclared identifier is reported only once for each function it appears in
fs/verity/verify.c:277:26: error: expected ';' before '{' token
bio_for_each_segment_all(bv, bio, i) {
^ ~
;

Caused by commit

eb754eb2a953 ("block: allow bio_for_each_segment_all() to iterate over multi-page bvec")

interacting with commit

281bf3cdf27a ("fs-verity: add data verification hooks for ->readpages()")

I have applied the following merge fix patch:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Wed, 16 Jan 2019 13:53:07 +1100
Subject: [PATCH] fs-verity: fix up for bio_for_each_segment_all() API change

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
fs/verity/verify.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/fs/verity/verify.c b/fs/verity/verify.c
index e308f22475e8..dbd388ef32e1 100644
--- a/fs/verity/verify.c
+++ b/fs/verity/verify.c
@@ -266,15 +266,16 @@ void fsverity_verify_bio(struct bio *bio)
struct ahash_request *req;
struct bio_vec *bv;
int i;
+ struct bvec_iter_all iter_all;

req = ahash_request_alloc(vi->hash_alg->tfm, GFP_KERNEL);
if (unlikely(!req)) {
- bio_for_each_segment_all(bv, bio, i)
+ bio_for_each_segment_all(bv, bio, i, iter_all)
SetPageError(bv->bv_page);
return;
}

- bio_for_each_segment_all(bv, bio, i) {
+ bio_for_each_segment_all(bv, bio, i, iter_all) {
struct page *page = bv->bv_page;

if (!PageError(page) && !verify_page(inode, vi, req, page))
--
2.20.1

--
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]