summaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorChuck Lever2007-05-09 00:23:28 +0200
committerTrond Myklebust2007-05-09 23:58:00 +0200
commite4cc6ee2e40bdd57990577b7f851fa2ca48edf47 (patch)
treefa2515a197df6a75be707a1054a0c0f026f38ba4 /fs/nfs
parentNFS: NFS client underestimates how large an NFSv4 SETATTR reply can be (diff)
downloadkernel-qcow2-linux-e4cc6ee2e40bdd57990577b7f851fa2ca48edf47.tar.gz
kernel-qcow2-linux-e4cc6ee2e40bdd57990577b7f851fa2ca48edf47.tar.xz
kernel-qcow2-linux-e4cc6ee2e40bdd57990577b7f851fa2ca48edf47.zip
NFS: Clean up NFSv4 XDR error message
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>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/nfs4xdr.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c
index f1e2b8cdf33c..938f37166788 100644
--- a/fs/nfs/nfs4xdr.c
+++ b/fs/nfs/nfs4xdr.c
@@ -2080,9 +2080,11 @@ out:
#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)