mirror of
https://github.com/torvalds/linux.git
synced 2024-11-24 05:02:12 +00:00
pNFS/flexfiles: missing error code in ff_layout_alloc_lseg()
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>
This commit is contained in:
parent
6d3b5d8d8d
commit
662f9a105b
@ -454,6 +454,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…
Reference in New Issue
Block a user