]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
pNFS: Fix post-layoutget error handling in pnfs_update_layout()
authorTrond Myklebust <trond.myklebust@primarydata.com>
Thu, 14 Jul 2016 22:34:12 +0000 (18:34 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 20 Aug 2016 16:10:56 +0000 (18:10 +0200)
commitabea02370df17f8c9ce705820782ef7ddedde82a
tree9e2754552f9bbdb8f7b473d64c2110d10e9b7799
parent1002a32d62ab9b972e7f5cee884c1866a5906b93
pNFS: Fix post-layoutget error handling in pnfs_update_layout()

commit 56b38a1f7c781519eef09c1668a3c97ea911f86b upstream.

The non-retry error path is currently broken and ends up releasing the
reference to the layout twice. It also can end up clearing the
NFS_LAYOUT_FIRST_LAYOUTGET flag twice, causing a race.

In addition, the retry path will fail to decrement the plh_outstanding
counter.

Fixes: 183d9e7b112aa ("pnfs: rework LAYOUTGET retry handling")
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Reviewed-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/nfs/pnfs.c