nfs41: fix nfs4_proc_layoutget error handling
authorPeng Tao <tao.peng@primarydata.com>
Mon, 17 Nov 2014 03:05:17 +0000 (11:05 +0800)
committerTrond Myklebust <trond.myklebust@primarydata.com>
Mon, 24 Nov 2014 22:14:54 +0000 (17:14 -0500)
commit4bd5a980de87d2b5af417485bde97b8eb3d6cf6a
tree2a6ea37a5b07ab66951519a076d5f2e6c0c6905e
parentcb1410c71e0b6b2eba8c1890645a76ff86169d24
nfs41: fix nfs4_proc_layoutget error handling

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")
Cc: stable@vger.kernel.org # 3.9+
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
fs/nfs/nfs4proc.c