]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
pNFS/flexfiles: Fix list corruption if the mirror count changes
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Mon, 22 Jun 2020 19:04:15 +0000 (15:04 -0400)
committerSasha Levin <sashal@kernel.org>
Tue, 30 Jun 2020 19:38:45 +0000 (15:38 -0400)
commit86dfbc17a336905d53835a532c85aa424e25ca0d
treee737db73a6050ff5807ec94575457a6299fb985d
parenta20cecece4c3fd6d9a11a221a4f183585e14ce70
pNFS/flexfiles: Fix list corruption if the mirror count changes

commit 8b04013737341442ed914b336cde866b902664ae upstream.

If the mirror count changes in the new layout we pick up inside
ff_layout_pg_init_write(), then we can end up adding the
request to the wrong mirror and corrupting the mirror->pg_list.

Fixes: d600ad1f2bdb ("NFS41: pop some layoutget errors to application")
Cc: stable@vger.kernel.org
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/nfs/flexfilelayout/flexfilelayout.c