nfsd: fix dprintk in nfsd4_encode_getdeviceinfo
authorJeff Layton <jlayton@redhat.com>
Thu, 22 Sep 2016 11:19:02 +0000 (07:19 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Fri, 23 Sep 2016 14:18:52 +0000 (10:18 -0400)
nfserr is big-endian, so we should convert it to host-endian before
printing it.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfs4xdr.c

index 0aa0236a142904c6de5123b87ef96c55043c7f7d..7f8232e32dc73ab5361b7bc3f6946e67c30dc77e 100644 (file)
@@ -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;