]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
NFS: Fix missing pg_cleanup after nfs_pageio_cond_complete()
authorBenjamin Coddington <bcodding@redhat.com>
Fri, 14 Apr 2017 16:29:54 +0000 (12:29 -0400)
committerSasha Levin <alexander.levin@microsoft.com>
Wed, 23 May 2018 01:33:49 +0000 (21:33 -0400)
commited64e0401e30053f2b2737be1a29337fa035f1a8
treee628e09384c1f122ee98bc0521a7633e72a7724f
parent5e71923dedb97d8635d4cd0aaa5ba82f60a2896d
NFS: Fix missing pg_cleanup after nfs_pageio_cond_complete()

[ Upstream commit 43b7d964ed30dbca5c83c90cb010985b429ec4f9 ]

Commit a7d42ddb3099727f58366fa006f850a219cce6c8 ("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: a7d42ddb3099 ("nfs: add mirroring support to pgio layer")
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
fs/nfs/pagelist.c