Skip to content

Commit 43b7d96

Browse files
bcodding-rhtrondmypd
authored andcommitted
NFS: Fix missing pg_cleanup after nfs_pageio_cond_complete()
Commit a7d42dd ("nfs: add mirroring support to pgio layer") moved pg_cleanup out of the path when there was non-sequental I/O that needed to be flushed. The result is that for layouts that have more than one layout segment per file, the pg_lseg is not cleared, so we can end up hitting the WARN_ON_ONCE(req_start >= seg_end) in pnfs_generic_pg_test since the pg_lseg will be pointing to that previously-flushed layout segment. Signed-off-by: Benjamin Coddington <bcodding@redhat.com> Fixes: a7d42dd ("nfs: add mirroring support to pgio layer") Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
1 parent 62b2417 commit 43b7d96

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

fs/nfs/pagelist.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1256,8 +1256,10 @@ void nfs_pageio_cond_complete(struct nfs_pageio_descriptor *desc, pgoff_t index)
12561256
mirror = &desc->pg_mirrors[midx];
12571257
if (!list_empty(&mirror->pg_list)) {
12581258
prev = nfs_list_entry(mirror->pg_list.prev);
1259-
if (index != prev->wb_index + 1)
1260-
nfs_pageio_complete_mirror(desc, midx);
1259+
if (index != prev->wb_index + 1) {
1260+
nfs_pageio_complete(desc);
1261+
break;
1262+
}
12611263
}
12621264
}
12631265
}

0 commit comments

Comments
 (0)