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:57:27 +0000 (18:57 -0700)
commitfa79b305db43a0af40b11f0934db48e7576e8b57
treedd66dbf84898c9be490623452628364d75450f65
parent7c3214d5c80afffb7b586d29033393a09ea65b73
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