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: d67ae825a5
("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>
This commit is contained in:
parent
2847cd27cc
commit
9f3e50a54b
1 changed files with 1 additions and 0 deletions
|
@ -461,6 +461,7 @@ ff_layout_alloc_lseg(struct pnfs_layout_hdr *lh,
|
|||
goto out_err_free;
|
||||
|
||||
/* fh */
|
||||
rc = -EIO;
|
||||
p = xdr_inline_decode(&stream, 4);
|
||||
if (!p)
|
||||
goto out_err_free;
|
||||
|
|
Loading…
Add table
Reference in a new issue