Skip to content

Commit

Permalink
NFS: Clean up NFSv4 XDR error message
Browse files Browse the repository at this point in the history
Make it more useful for debugging purposes.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
  • Loading branch information
Chuck Lever authored and Trond Myklebust committed May 9, 2007
1 parent 6ce7dc9 commit e4cc6ee
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions fs/nfs/nfs4xdr.c
Original file line number Diff line number Diff line change
Expand Up @@ -2080,9 +2080,11 @@ static int nfs4_xdr_enc_fs_locations(struct rpc_rqst *req, __be32 *p, struct nfs

#define READ_BUF(nbytes) do { \
p = xdr_inline_decode(xdr, nbytes); \
if (!p) { \
printk(KERN_WARNING "%s: reply buffer overflowed in line %d.", \
__FUNCTION__, __LINE__); \
if (unlikely(!p)) { \
printk(KERN_INFO "%s: prematurely hit end of receive" \
" buffer\n", __FUNCTION__); \
printk(KERN_INFO "%s: xdr->p=%p, bytes=%u, xdr->end=%p\n", \
__FUNCTION__, xdr->p, nbytes, xdr->end); \
return -EIO; \
} \
} while (0)
Expand Down

0 comments on commit e4cc6ee

Please sign in to comment.