2015-03-22 14:17:19

by Kinglong Mee

[permalink] [raw]
Subject: [PATCH] NFSD: Take care the return value from nfsd4_encode_stateid

Signed-off-by: Kinglong Mee <[email protected]>
---
fs/nfsd/nfs4xdr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
index dd9302c..5c0aa74 100644
--- a/fs/nfsd/nfs4xdr.c
+++ b/fs/nfsd/nfs4xdr.c
@@ -4135,7 +4135,7 @@ nfsd4_encode_layoutreturn(struct nfsd4_compoundres *resp, __be32 nfserr,
return nfserr_resource;
*p++ = cpu_to_be32(lrp->lrs_present);
if (lrp->lrs_present)
- nfsd4_encode_stateid(xdr, &lrp->lr_sid);
+ return nfsd4_encode_stateid(xdr, &lrp->lr_sid);
return nfs_ok;
}
#endif /* CONFIG_NFSD_PNFS */
--
2.3.3



2015-03-24 06:51:46

by Christoph Hellwig

[permalink] [raw]
Subject: Re: [PATCH] NFSD: Take care the return value from nfsd4_encode_stateid

On Sun, Mar 22, 2015 at 10:17:10PM +0800, Kinglong Mee wrote:
> Signed-off-by: Kinglong Mee <[email protected]>

Looks good,

Reviewed-by: Christoph Hellwig <[email protected]>