aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2007-09-11 18:01:10 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2007-10-09 17:17:09 -0400
commitfe82a183ca3c9188945c4ebeebc2ca45abfa24e5 (patch)
tree414f292cf5e9808359796af5d6b7c900a0aaefab /fs/nfs
parent0ac83779fa5bffb90e32a97abc61f1840af31ee9 (diff)
NFS: Convert printk's to dprintk's in fs/nfs/nfs?xdr.c
Due to recent edict to replace or remove printk's that can be triggered en masse by remote misbehavior. Left a few that only occur just before a BUG. 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/nfs2xdr.c18
-rw-r--r--fs/nfs/nfs3xdr.c23
-rw-r--r--fs/nfs/nfs4xdr.c43
3 files changed, 42 insertions, 42 deletions
diff --git a/fs/nfs/nfs2xdr.c b/fs/nfs/nfs2xdr.c
index c5fce7567200..1c570948fc16 100644
--- a/fs/nfs/nfs2xdr.c
+++ b/fs/nfs/nfs2xdr.c
@@ -271,7 +271,7 @@ nfs_xdr_readres(struct rpc_rqst *req, __be32 *p, struct nfs_readres *res)
271 res->eof = 0; 271 res->eof = 0;
272 hdrlen = (u8 *) p - (u8 *) iov->iov_base; 272 hdrlen = (u8 *) p - (u8 *) iov->iov_base;
273 if (iov->iov_len < hdrlen) { 273 if (iov->iov_len < hdrlen) {
274 printk(KERN_WARNING "NFS: READ reply header overflowed:" 274 dprintk("NFS: READ reply header overflowed:"
275 "length %d > %Zu\n", hdrlen, iov->iov_len); 275 "length %d > %Zu\n", hdrlen, iov->iov_len);
276 return -errno_NFSERR_IO; 276 return -errno_NFSERR_IO;
277 } else if (iov->iov_len != hdrlen) { 277 } else if (iov->iov_len != hdrlen) {
@@ -281,7 +281,7 @@ nfs_xdr_readres(struct rpc_rqst *req, __be32 *p, struct nfs_readres *res)
281 281
282 recvd = req->rq_rcv_buf.len - hdrlen; 282 recvd = req->rq_rcv_buf.len - hdrlen;
283 if (count > recvd) { 283 if (count > recvd) {
284 printk(KERN_WARNING "NFS: server cheating in read reply: " 284 dprintk("NFS: server cheating in read reply: "
285 "count %d > recvd %d\n", count, recvd); 285 "count %d > recvd %d\n", count, recvd);
286 count = recvd; 286 count = recvd;
287 } 287 }
@@ -431,7 +431,7 @@ nfs_xdr_readdirres(struct rpc_rqst *req, __be32 *p, void *dummy)
431 431
432 hdrlen = (u8 *) p - (u8 *) iov->iov_base; 432 hdrlen = (u8 *) p - (u8 *) iov->iov_base;
433 if (iov->iov_len < hdrlen) { 433 if (iov->iov_len < hdrlen) {
434 printk(KERN_WARNING "NFS: READDIR reply header overflowed:" 434 dprintk("NFS: READDIR reply header overflowed:"
435 "length %d > %Zu\n", hdrlen, iov->iov_len); 435 "length %d > %Zu\n", hdrlen, iov->iov_len);
436 return -errno_NFSERR_IO; 436 return -errno_NFSERR_IO;
437 } else if (iov->iov_len != hdrlen) { 437 } else if (iov->iov_len != hdrlen) {
@@ -454,7 +454,7 @@ nfs_xdr_readdirres(struct rpc_rqst *req, __be32 *p, void *dummy)
454 len = ntohl(*p++); 454 len = ntohl(*p++);
455 p += XDR_QUADLEN(len) + 1; /* name plus cookie */ 455 p += XDR_QUADLEN(len) + 1; /* name plus cookie */
456 if (len > NFS2_MAXNAMLEN) { 456 if (len > NFS2_MAXNAMLEN) {
457 printk(KERN_WARNING "NFS: giant filename in readdir (len 0x%x)!\n", 457 dprintk("NFS: giant filename in readdir (len 0x%x)!\n",
458 len); 458 len);
459 goto err_unmap; 459 goto err_unmap;
460 } 460 }
@@ -471,7 +471,7 @@ nfs_xdr_readdirres(struct rpc_rqst *req, __be32 *p, void *dummy)
471 entry[0] = entry[1] = 0; 471 entry[0] = entry[1] = 0;
472 /* truncate listing ? */ 472 /* truncate listing ? */
473 if (!nr) { 473 if (!nr) {
474 printk(KERN_NOTICE "NFS: readdir reply truncated!\n"); 474 dprintk("NFS: readdir reply truncated!\n");
475 entry[1] = 1; 475 entry[1] = 1;
476 } 476 }
477 goto out; 477 goto out;
@@ -583,12 +583,12 @@ nfs_xdr_readlinkres(struct rpc_rqst *req, __be32 *p, void *dummy)
583 /* Convert length of symlink */ 583 /* Convert length of symlink */
584 len = ntohl(*p++); 584 len = ntohl(*p++);
585 if (len >= rcvbuf->page_len || len <= 0) { 585 if (len >= rcvbuf->page_len || len <= 0) {
586 dprintk(KERN_WARNING "nfs: server returned giant symlink!\n"); 586 dprintk("nfs: server returned giant symlink!\n");
587 return -ENAMETOOLONG; 587 return -ENAMETOOLONG;
588 } 588 }
589 hdrlen = (u8 *) p - (u8 *) iov->iov_base; 589 hdrlen = (u8 *) p - (u8 *) iov->iov_base;
590 if (iov->iov_len < hdrlen) { 590 if (iov->iov_len < hdrlen) {
591 printk(KERN_WARNING "NFS: READLINK reply header overflowed:" 591 dprintk("NFS: READLINK reply header overflowed:"
592 "length %d > %Zu\n", hdrlen, iov->iov_len); 592 "length %d > %Zu\n", hdrlen, iov->iov_len);
593 return -errno_NFSERR_IO; 593 return -errno_NFSERR_IO;
594 } else if (iov->iov_len != hdrlen) { 594 } else if (iov->iov_len != hdrlen) {
@@ -597,7 +597,7 @@ nfs_xdr_readlinkres(struct rpc_rqst *req, __be32 *p, void *dummy)
597 } 597 }
598 recvd = req->rq_rcv_buf.len - hdrlen; 598 recvd = req->rq_rcv_buf.len - hdrlen;
599 if (recvd < len) { 599 if (recvd < len) {
600 printk(KERN_WARNING "NFS: server cheating in readlink reply: " 600 dprintk("NFS: server cheating in readlink reply: "
601 "count %u > recvd %u\n", len, recvd); 601 "count %u > recvd %u\n", len, recvd);
602 return -EIO; 602 return -EIO;
603 } 603 }
@@ -695,7 +695,7 @@ nfs_stat_to_errno(int stat)
695 if (nfs_errtbl[i].stat == stat) 695 if (nfs_errtbl[i].stat == stat)
696 return nfs_errtbl[i].errno; 696 return nfs_errtbl[i].errno;
697 } 697 }
698 printk(KERN_ERR "nfs_stat_to_errno: bad nfs status return value: %d\n", stat); 698 dprintk("nfs_stat_to_errno: bad nfs status return value: %d\n", stat);
699 return nfs_errtbl[i].errno; 699 return nfs_errtbl[i].errno;
700} 700}
701 701
diff --git a/fs/nfs/nfs3xdr.c b/fs/nfs/nfs3xdr.c
index d9e08f0cf2a0..8a225fbe9ee2 100644
--- a/fs/nfs/nfs3xdr.c
+++ b/fs/nfs/nfs3xdr.c
@@ -524,7 +524,7 @@ nfs3_xdr_readdirres(struct rpc_rqst *req, __be32 *p, struct nfs3_readdirres *res
524 524
525 hdrlen = (u8 *) p - (u8 *) iov->iov_base; 525 hdrlen = (u8 *) p - (u8 *) iov->iov_base;
526 if (iov->iov_len < hdrlen) { 526 if (iov->iov_len < hdrlen) {
527 printk(KERN_WARNING "NFS: READDIR reply header overflowed:" 527 dprintk("NFS: READDIR reply header overflowed:"
528 "length %d > %Zu\n", hdrlen, iov->iov_len); 528 "length %d > %Zu\n", hdrlen, iov->iov_len);
529 return -errno_NFSERR_IO; 529 return -errno_NFSERR_IO;
530 } else if (iov->iov_len != hdrlen) { 530 } else if (iov->iov_len != hdrlen) {
@@ -547,7 +547,7 @@ nfs3_xdr_readdirres(struct rpc_rqst *req, __be32 *p, struct nfs3_readdirres *res
547 len = ntohl(*p++); /* string length */ 547 len = ntohl(*p++); /* string length */
548 p += XDR_QUADLEN(len) + 2; /* name + cookie */ 548 p += XDR_QUADLEN(len) + 2; /* name + cookie */
549 if (len > NFS3_MAXNAMLEN) { 549 if (len > NFS3_MAXNAMLEN) {
550 printk(KERN_WARNING "NFS: giant filename in readdir (len %x)!\n", 550 dprintk("NFS: giant filename in readdir (len %x)!\n",
551 len); 551 len);
552 goto err_unmap; 552 goto err_unmap;
553 } 553 }
@@ -567,7 +567,7 @@ nfs3_xdr_readdirres(struct rpc_rqst *req, __be32 *p, struct nfs3_readdirres *res
567 goto short_pkt; 567 goto short_pkt;
568 len = ntohl(*p++); 568 len = ntohl(*p++);
569 if (len > NFS3_FHSIZE) { 569 if (len > NFS3_FHSIZE) {
570 printk(KERN_WARNING "NFS: giant filehandle in " 570 dprintk("NFS: giant filehandle in "
571 "readdir (len %x)!\n", len); 571 "readdir (len %x)!\n", len);
572 goto err_unmap; 572 goto err_unmap;
573 } 573 }
@@ -588,7 +588,7 @@ nfs3_xdr_readdirres(struct rpc_rqst *req, __be32 *p, struct nfs3_readdirres *res
588 entry[0] = entry[1] = 0; 588 entry[0] = entry[1] = 0;
589 /* truncate listing ? */ 589 /* truncate listing ? */
590 if (!nr) { 590 if (!nr) {
591 printk(KERN_NOTICE "NFS: readdir reply truncated!\n"); 591 dprintk("NFS: readdir reply truncated!\n");
592 entry[1] = 1; 592 entry[1] = 1;
593 } 593 }
594 goto out; 594 goto out;
@@ -826,22 +826,23 @@ nfs3_xdr_readlinkres(struct rpc_rqst *req, __be32 *p, struct nfs_fattr *fattr)
826 /* Convert length of symlink */ 826 /* Convert length of symlink */
827 len = ntohl(*p++); 827 len = ntohl(*p++);
828 if (len >= rcvbuf->page_len || len <= 0) { 828 if (len >= rcvbuf->page_len || len <= 0) {
829 dprintk(KERN_WARNING "nfs: server returned giant symlink!\n"); 829 dprintk("nfs: server returned giant symlink!\n");
830 return -ENAMETOOLONG; 830 return -ENAMETOOLONG;
831 } 831 }
832 832
833 hdrlen = (u8 *) p - (u8 *) iov->iov_base; 833 hdrlen = (u8 *) p - (u8 *) iov->iov_base;
834 if (iov->iov_len < hdrlen) { 834 if (iov->iov_len < hdrlen) {
835 printk(KERN_WARNING "NFS: READLINK reply header overflowed:" 835 dprintk("NFS: READLINK reply header overflowed:"
836 "length %d > %Zu\n", hdrlen, iov->iov_len); 836 "length %d > %Zu\n", hdrlen, iov->iov_len);
837 return -errno_NFSERR_IO; 837 return -errno_NFSERR_IO;
838 } else if (iov->iov_len != hdrlen) { 838 } else if (iov->iov_len != hdrlen) {
839 dprintk("NFS: READLINK header is short. iovec will be shifted.\n"); 839 dprintk("NFS: READLINK header is short. "
840 "iovec will be shifted.\n");
840 xdr_shift_buf(rcvbuf, iov->iov_len - hdrlen); 841 xdr_shift_buf(rcvbuf, iov->iov_len - hdrlen);
841 } 842 }
842 recvd = req->rq_rcv_buf.len - hdrlen; 843 recvd = req->rq_rcv_buf.len - hdrlen;
843 if (recvd < len) { 844 if (recvd < len) {
844 printk(KERN_WARNING "NFS: server cheating in readlink reply: " 845 dprintk("NFS: server cheating in readlink reply: "
845 "count %u > recvd %u\n", len, recvd); 846 "count %u > recvd %u\n", len, recvd);
846 return -EIO; 847 return -EIO;
847 } 848 }
@@ -876,13 +877,13 @@ nfs3_xdr_readres(struct rpc_rqst *req, __be32 *p, struct nfs_readres *res)
876 ocount = ntohl(*p++); 877 ocount = ntohl(*p++);
877 878
878 if (ocount != count) { 879 if (ocount != count) {
879 printk(KERN_WARNING "NFS: READ count doesn't match RPC opaque count.\n"); 880 dprintk("NFS: READ count doesn't match RPC opaque count.\n");
880 return -errno_NFSERR_IO; 881 return -errno_NFSERR_IO;
881 } 882 }
882 883
883 hdrlen = (u8 *) p - (u8 *) iov->iov_base; 884 hdrlen = (u8 *) p - (u8 *) iov->iov_base;
884 if (iov->iov_len < hdrlen) { 885 if (iov->iov_len < hdrlen) {
885 printk(KERN_WARNING "NFS: READ reply header overflowed:" 886 dprintk("NFS: READ reply header overflowed:"
886 "length %d > %Zu\n", hdrlen, iov->iov_len); 887 "length %d > %Zu\n", hdrlen, iov->iov_len);
887 return -errno_NFSERR_IO; 888 return -errno_NFSERR_IO;
888 } else if (iov->iov_len != hdrlen) { 889 } else if (iov->iov_len != hdrlen) {
@@ -892,7 +893,7 @@ nfs3_xdr_readres(struct rpc_rqst *req, __be32 *p, struct nfs_readres *res)
892 893
893 recvd = req->rq_rcv_buf.len - hdrlen; 894 recvd = req->rq_rcv_buf.len - hdrlen;
894 if (count > recvd) { 895 if (count > recvd) {
895 printk(KERN_WARNING "NFS: server cheating in read reply: " 896 dprintk("NFS: server cheating in read reply: "
896 "count %d > recvd %d\n", count, recvd); 897 "count %d > recvd %d\n", count, recvd);
897 count = recvd; 898 count = recvd;
898 res->eof = 0; 899 res->eof = 0;
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c
index badd73b7ca12..4dbbf44727ea 100644
--- a/fs/nfs/nfs4xdr.c
+++ b/fs/nfs/nfs4xdr.c
@@ -562,7 +562,6 @@ struct compound_hdr {
562 562
563#define RESERVE_SPACE(nbytes) do { \ 563#define RESERVE_SPACE(nbytes) do { \
564 p = xdr_reserve_space(xdr, nbytes); \ 564 p = xdr_reserve_space(xdr, nbytes); \
565 if (!p) printk("RESERVE_SPACE(%d) failed in function %s\n", (int) (nbytes), __FUNCTION__); \
566 BUG_ON(!p); \ 565 BUG_ON(!p); \
567} while (0) 566} while (0)
568 567
@@ -628,8 +627,8 @@ static int encode_attrs(struct xdr_stream *xdr, const struct iattr *iap, const s
628 if (iap->ia_valid & ATTR_UID) { 627 if (iap->ia_valid & ATTR_UID) {
629 owner_namelen = nfs_map_uid_to_name(server->nfs_client, iap->ia_uid, owner_name); 628 owner_namelen = nfs_map_uid_to_name(server->nfs_client, iap->ia_uid, owner_name);
630 if (owner_namelen < 0) { 629 if (owner_namelen < 0) {
631 printk(KERN_WARNING "nfs: couldn't resolve uid %d to string\n", 630 dprintk("nfs: couldn't resolve uid %d to string\n",
632 iap->ia_uid); 631 iap->ia_uid);
633 /* XXX */ 632 /* XXX */
634 strcpy(owner_name, "nobody"); 633 strcpy(owner_name, "nobody");
635 owner_namelen = sizeof("nobody") - 1; 634 owner_namelen = sizeof("nobody") - 1;
@@ -640,8 +639,8 @@ static int encode_attrs(struct xdr_stream *xdr, const struct iattr *iap, const s
640 if (iap->ia_valid & ATTR_GID) { 639 if (iap->ia_valid & ATTR_GID) {
641 owner_grouplen = nfs_map_gid_to_group(server->nfs_client, iap->ia_gid, owner_group); 640 owner_grouplen = nfs_map_gid_to_group(server->nfs_client, iap->ia_gid, owner_group);
642 if (owner_grouplen < 0) { 641 if (owner_grouplen < 0) {
643 printk(KERN_WARNING "nfs4: couldn't resolve gid %d to string\n", 642 dprintk("nfs: couldn't resolve gid %d to string\n",
644 iap->ia_gid); 643 iap->ia_gid);
645 strcpy(owner_group, "nobody"); 644 strcpy(owner_group, "nobody");
646 owner_grouplen = sizeof("nobody") - 1; 645 owner_grouplen = sizeof("nobody") - 1;
647 /* goto out; */ 646 /* goto out; */
@@ -711,7 +710,7 @@ static int encode_attrs(struct xdr_stream *xdr, const struct iattr *iap, const s
711 * Now we backfill the bitmap and the attribute buffer length. 710 * Now we backfill the bitmap and the attribute buffer length.
712 */ 711 */
713 if (len != ((char *)p - (char *)q) + 4) { 712 if (len != ((char *)p - (char *)q) + 4) {
714 printk ("encode_attr: Attr length calculation error! %u != %Zu\n", 713 printk(KERN_ERR "nfs: Attr length error, %u != %Zu\n",
715 len, ((char *)p - (char *)q) + 4); 714 len, ((char *)p - (char *)q) + 4);
716 BUG(); 715 BUG();
717 } 716 }
@@ -2180,9 +2179,9 @@ out:
2180#define READ_BUF(nbytes) do { \ 2179#define READ_BUF(nbytes) do { \
2181 p = xdr_inline_decode(xdr, nbytes); \ 2180 p = xdr_inline_decode(xdr, nbytes); \
2182 if (unlikely(!p)) { \ 2181 if (unlikely(!p)) { \
2183 printk(KERN_INFO "%s: prematurely hit end of receive" \ 2182 dprintk("nfs: %s: prematurely hit end of receive" \
2184 " buffer\n", __FUNCTION__); \ 2183 " buffer\n", __FUNCTION__); \
2185 printk(KERN_INFO "%s: xdr->p=%p, bytes=%u, xdr->end=%p\n", \ 2184 dprintk("nfs: %s: xdr->p=%p, bytes=%u, xdr->end=%p\n", \
2186 __FUNCTION__, xdr->p, nbytes, xdr->end); \ 2185 __FUNCTION__, xdr->p, nbytes, xdr->end); \
2187 return -EIO; \ 2186 return -EIO; \
2188 } \ 2187 } \
@@ -2223,9 +2222,8 @@ static int decode_op_hdr(struct xdr_stream *xdr, enum nfs_opnum4 expected)
2223 READ_BUF(8); 2222 READ_BUF(8);
2224 READ32(opnum); 2223 READ32(opnum);
2225 if (opnum != expected) { 2224 if (opnum != expected) {
2226 printk(KERN_NOTICE 2225 dprintk("nfs: Server returned operation"
2227 "nfs4_decode_op_hdr: Server returned operation" 2226 " %d but we issued a request for %d\n",
2228 " %d but we issued a request for %d\n",
2229 opnum, expected); 2227 opnum, expected);
2230 return -EIO; 2228 return -EIO;
2231 } 2229 }
@@ -2758,7 +2756,7 @@ static int decode_attr_owner(struct xdr_stream *xdr, uint32_t *bitmap, struct nf
2758 dprintk("%s: nfs_map_name_to_uid failed!\n", 2756 dprintk("%s: nfs_map_name_to_uid failed!\n",
2759 __FUNCTION__); 2757 __FUNCTION__);
2760 } else 2758 } else
2761 printk(KERN_WARNING "%s: name too long (%u)!\n", 2759 dprintk("%s: name too long (%u)!\n",
2762 __FUNCTION__, len); 2760 __FUNCTION__, len);
2763 bitmap[1] &= ~FATTR4_WORD1_OWNER; 2761 bitmap[1] &= ~FATTR4_WORD1_OWNER;
2764 } 2762 }
@@ -2783,7 +2781,7 @@ static int decode_attr_group(struct xdr_stream *xdr, uint32_t *bitmap, struct nf
2783 dprintk("%s: nfs_map_group_to_gid failed!\n", 2781 dprintk("%s: nfs_map_group_to_gid failed!\n",
2784 __FUNCTION__); 2782 __FUNCTION__);
2785 } else 2783 } else
2786 printk(KERN_WARNING "%s: name too long (%u)!\n", 2784 dprintk("%s: name too long (%u)!\n",
2787 __FUNCTION__, len); 2785 __FUNCTION__, len);
2788 bitmap[1] &= ~FATTR4_WORD1_OWNER_GROUP; 2786 bitmap[1] &= ~FATTR4_WORD1_OWNER_GROUP;
2789 } 2787 }
@@ -2950,7 +2948,8 @@ static int verify_attr_len(struct xdr_stream *xdr, __be32 *savep, uint32_t attrl
2950 unsigned int nwords = xdr->p - savep; 2948 unsigned int nwords = xdr->p - savep;
2951 2949
2952 if (unlikely(attrwords != nwords)) { 2950 if (unlikely(attrwords != nwords)) {
2953 printk(KERN_WARNING "%s: server returned incorrect attribute length: %u %c %u\n", 2951 dprintk("%s: server returned incorrect attribute length: "
2952 "%u %c %u\n",
2954 __FUNCTION__, 2953 __FUNCTION__,
2955 attrwords << 2, 2954 attrwords << 2,
2956 (attrwords < nwords) ? '<' : '>', 2955 (attrwords < nwords) ? '<' : '>',
@@ -3451,7 +3450,7 @@ static int decode_read(struct xdr_stream *xdr, struct rpc_rqst *req, struct nfs_
3451 hdrlen = (u8 *) p - (u8 *) iov->iov_base; 3450 hdrlen = (u8 *) p - (u8 *) iov->iov_base;
3452 recvd = req->rq_rcv_buf.len - hdrlen; 3451 recvd = req->rq_rcv_buf.len - hdrlen;
3453 if (count > recvd) { 3452 if (count > recvd) {
3454 printk(KERN_WARNING "NFS: server cheating in read reply: " 3453 dprintk("NFS: server cheating in read reply: "
3455 "count %u > recvd %u\n", count, recvd); 3454 "count %u > recvd %u\n", count, recvd);
3456 count = recvd; 3455 count = recvd;
3457 eof = 0; 3456 eof = 0;
@@ -3500,7 +3499,8 @@ static int decode_readdir(struct xdr_stream *xdr, struct rpc_rqst *req, struct n
3500 p += 2; /* cookie */ 3499 p += 2; /* cookie */
3501 len = ntohl(*p++); /* filename length */ 3500 len = ntohl(*p++); /* filename length */
3502 if (len > NFS4_MAXNAMLEN) { 3501 if (len > NFS4_MAXNAMLEN) {
3503 printk(KERN_WARNING "NFS: giant filename in readdir (len 0x%x)\n", len); 3502 dprintk("NFS: giant filename in readdir (len 0x%x)\n",
3503 len);
3504 goto err_unmap; 3504 goto err_unmap;
3505 } 3505 }
3506 xlen = XDR_QUADLEN(len); 3506 xlen = XDR_QUADLEN(len);
@@ -3528,7 +3528,7 @@ short_pkt:
3528 entry[0] = entry[1] = 0; 3528 entry[0] = entry[1] = 0;
3529 /* truncate listing ? */ 3529 /* truncate listing ? */
3530 if (!nr) { 3530 if (!nr) {
3531 printk(KERN_NOTICE "NFS: readdir reply truncated!\n"); 3531 dprintk("NFS: readdir reply truncated!\n");
3532 entry[1] = 1; 3532 entry[1] = 1;
3533 } 3533 }
3534 goto out; 3534 goto out;
@@ -3554,13 +3554,13 @@ static int decode_readlink(struct xdr_stream *xdr, struct rpc_rqst *req)
3554 READ_BUF(4); 3554 READ_BUF(4);
3555 READ32(len); 3555 READ32(len);
3556 if (len >= rcvbuf->page_len || len <= 0) { 3556 if (len >= rcvbuf->page_len || len <= 0) {
3557 dprintk(KERN_WARNING "nfs: server returned giant symlink!\n"); 3557 dprintk("nfs: server returned giant symlink!\n");
3558 return -ENAMETOOLONG; 3558 return -ENAMETOOLONG;
3559 } 3559 }
3560 hdrlen = (char *) xdr->p - (char *) iov->iov_base; 3560 hdrlen = (char *) xdr->p - (char *) iov->iov_base;
3561 recvd = req->rq_rcv_buf.len - hdrlen; 3561 recvd = req->rq_rcv_buf.len - hdrlen;
3562 if (recvd < len) { 3562 if (recvd < len) {
3563 printk(KERN_WARNING "NFS: server cheating in readlink reply: " 3563 dprintk("NFS: server cheating in readlink reply: "
3564 "count %u > recvd %u\n", len, recvd); 3564 "count %u > recvd %u\n", len, recvd);
3565 return -EIO; 3565 return -EIO;
3566 } 3566 }
@@ -3643,7 +3643,7 @@ static int decode_getacl(struct xdr_stream *xdr, struct rpc_rqst *req,
3643 hdrlen = (u8 *)xdr->p - (u8 *)iov->iov_base; 3643 hdrlen = (u8 *)xdr->p - (u8 *)iov->iov_base;
3644 recvd = req->rq_rcv_buf.len - hdrlen; 3644 recvd = req->rq_rcv_buf.len - hdrlen;
3645 if (attrlen > recvd) { 3645 if (attrlen > recvd) {
3646 printk(KERN_WARNING "NFS: server cheating in getattr" 3646 dprintk("NFS: server cheating in getattr"
3647 " acl reply: attrlen %u > recvd %u\n", 3647 " acl reply: attrlen %u > recvd %u\n",
3648 attrlen, recvd); 3648 attrlen, recvd);
3649 return -EINVAL; 3649 return -EINVAL;
@@ -3688,8 +3688,7 @@ static int decode_setclientid(struct xdr_stream *xdr, struct nfs_client *clp)
3688 READ_BUF(8); 3688 READ_BUF(8);
3689 READ32(opnum); 3689 READ32(opnum);
3690 if (opnum != OP_SETCLIENTID) { 3690 if (opnum != OP_SETCLIENTID) {
3691 printk(KERN_NOTICE 3691 dprintk("nfs: decode_setclientid: Server returned operation"
3692 "nfs4_decode_setclientid: Server returned operation"
3693 " %d\n", opnum); 3692 " %d\n", opnum);
3694 return -EIO; 3693 return -EIO;
3695 } 3694 }