OSDN Git Service

pNFS/flexfiles: missing error code in ff_layout_alloc_lseg()
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 19 May 2017 21:31:12 +0000 (00:31 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 13 Apr 2018 17:48:05 +0000 (19:48 +0200)
commit07b2a3287210618676773e5f0945a46739e7d4ae
tree2c5cacb65c47493c85629a9b71e5bf58f7f2e302
parent2171500ab056060df54cc015f35560784447ab35
pNFS/flexfiles: missing error code in ff_layout_alloc_lseg()

[ Upstream commit 662f9a105b4322b8559d448f86110e6ec24b8738 ]

If xdr_inline_decode() fails then we end up returning ERR_PTR(0).  The
caller treats NULL returns as -ENOMEM so it doesn't really hurt runtime,
but obviously we intended to set an error code here.

Fixes: d67ae825a59d ("pnfs/flexfiles: Add the FlexFile Layout Driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/nfs/flexfilelayout/flexfilelayout.c