]> 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)
committerJiri Slaby <jslaby@suse.cz>
Wed, 7 Jan 2015 15:24:09 +0000 (16:24 +0100)
commitebccfce81acf2c023ae5adeddd7612ef2351c421
treefc3d2f15d3172bbf8df25b195d9fa86522c963cb
parentd9927e47772f49909075b62a3c1cffcee35a687c
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: Jiri Slaby <jslaby@suse.cz>
fs/nfs/nfs4proc.c