]> git.kernelconcepts.de Git - karo-tx-linux.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:00:48 +0000 (10:00 -0800)
commit74bce79fd4df17c1316dd0de23d94ce40daf8bf9
treeffe56ad39cdc805c18edf7a8a76baf719c96eba6
parentd46939673d59f3687bff8438305a726b3bb084c5
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