]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
nfs41: fix nfs4_proc_layoutget error handling
authorPeng Tao <tao.peng@primarydata.com>
Mon, 17 Nov 2014 03:05:17 +0000 (11:05 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 8 Jan 2015 18:27:45 +0000 (10:27 -0800)
commitc69637cbf42badaaac12d0a9a8eb7bbf53e73633
treed8c352c7293315fc582f50319b88a86d47ad41b8
parent98ceb4706cc3d5466f2fa7a0c1fdd97ffae6b13d
nfs41: fix nfs4_proc_layoutget error handling

commit 4bd5a980de87d2b5af417485bde97b8eb3d6cf6a upstream.

nfs4_layoutget_release() drops layout hdr refcnt. Grab the refcnt
early so that it is safe to call .release in case nfs4_alloc_pages
fails.

Signed-off-by: Peng Tao <tao.peng@primarydata.com>
Fixes: a47970ff78147 ("NFSv4.1: Hold reference to layout hdr in layoutget")
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/nfs/nfs4proc.c