Skip to contentSkip to conversation

nfsd: fix dprintk in nfsd4_encode_getdeviceinfo

PATCH In review Jeff Layton 2 participants 2 messages Sep 22, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nfsd: fix dprintk in nfsd4_encode_getdeviceinfo

nfserr is big-endian, so we should convert it to host-endian before printing it.

---
 fs/nfsd/nfs4xdr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/nfsd/nfs4xdr.c +1 -1
index 0aa0236a1429..7f8232e32dc7 100644
@@ -4062,7 +4062,7 @@ nfsd4_encode_getdeviceinfo(struct nfsd4_compoundres *resp, __be32 nfserr,
 	u32 starting_len = xdr->buf->len, needed_len;
 	__be32 *p;
 
-	dprintk("%s: err %d\n", __func__, nfserr);
+	dprintk("%s: err %d\n", __func__, be32_to_cpu(nfserr));
 	if (nfserr)
 		goto out;
 
Signature · 1 line
2.7.4
#1 lore raw
Quoted 2 lines · Jeff Layton

nfserr is big-endian, so we should convert it to host-endian before printing it.

Thanks, applying.--b.

Quoted 21 lines
---
 fs/nfsd/nfs4xdr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/nfsd/nfs4xdr.c +1 -1
index 0aa0236a1429..7f8232e32dc7 100644
@@ -4062,7 +4062,7 @@ nfsd4_encode_getdeviceinfo(struct nfsd4_compoundres *resp, __be32 nfserr,
 	u32 starting_len = xdr->buf->len, needed_len;
 	__be32 *p;
 
-	dprintk("%s: err %d\n", __func__, nfserr);
+	dprintk("%s: err %d\n", __func__, be32_to_cpu(nfserr));
 	if (nfserr)
 		goto out;
 
Signature · 1 line
2.7.4