Skip to content

Commit

Permalink
nfsd: fix offset printk's in nfsd3 read/write
Browse files Browse the repository at this point in the history
Thanks to [email protected] for noticing that the debugging printk in
the v3 write procedure can print >2GB offsets as negative numbers:
	https://bugzilla.kernel.org/show_bug.cgi?id=23342

Signed-off-by: J. Bruce Fields <[email protected]>
  • Loading branch information
J. Bruce Fields committed Dec 17, 2010
1 parent e203d50 commit 18b631f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions fs/nfsd/nfs3proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,10 @@ nfsd3_proc_read(struct svc_rqst *rqstp, struct nfsd3_readargs *argp,
__be32 nfserr;
u32 max_blocksize = svc_max_payload(rqstp);

dprintk("nfsd: READ(3) %s %lu bytes at %lu\n",
dprintk("nfsd: READ(3) %s %lu bytes at %Lu\n",
SVCFH_fmt(&argp->fh),
(unsigned long) argp->count,
(unsigned long) argp->offset);
(unsigned long long) argp->offset);

/* Obtain buffer pointer for payload.
* 1 (status) + 22 (post_op_attr) + 1 (count) + 1 (eof)
Expand Down Expand Up @@ -191,10 +191,10 @@ nfsd3_proc_write(struct svc_rqst *rqstp, struct nfsd3_writeargs *argp,
__be32 nfserr;
unsigned long cnt = argp->len;

dprintk("nfsd: WRITE(3) %s %d bytes at %ld%s\n",
dprintk("nfsd: WRITE(3) %s %d bytes at %Lu%s\n",
SVCFH_fmt(&argp->fh),
argp->len,
(unsigned long) argp->offset,
(unsigned long long) argp->offset,
argp->stable? " stable" : "");

fh_copy(&resp->fh, &argp->fh);
Expand Down

0 comments on commit 18b631f

Please sign in to comment.