]> git.karo-electronics.de Git - linux-beck.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)
committerTrond Myklebust <trond.myklebust@primarydata.com>
Tue, 19 Jul 2016 20:22:47 +0000 (16:22 -0400)
commit56b38a1f7c781519eef09c1668a3c97ea911f86b
treeb9f1ebb18cf397a61fb38a6cdd6f43243078bc60
parent8487c479e2668dd1231e9c3c77a203d744aec081
pNFS: Fix post-layoutget error handling in pnfs_update_layout()

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")
Cc: stable@vger.kernel.org # 4.7
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Reviewed-by: Jeff Layton <jlayton@redhat.com>
fs/nfs/pnfs.c