pNFS: Handle allocation errors correctly in filelayout_alloc_layout_hdr()
authorTrond Myklebust <trond.myklebust@primarydata.com>
Fri, 30 May 2014 00:06:55 +0000 (20:06 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 7 Jul 2014 01:54:14 +0000 (18:54 -0700)
commitf1631672d6cbf0d836a4eb3617a26add4281d4a3
tree7ecb0dc36f07c6c813efa27279f231d652b5bf04
parent44f694330e1eb6f52ab163d87c176469b9da0e94
pNFS: Handle allocation errors correctly in filelayout_alloc_layout_hdr()

commit 6df200f5d5191bdde4d2e408215383890f956781 upstream.

Return the NULL pointer when the allocation fails.

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/nfs/nfs4filelayout.c