Commit 1055414f authored by Kinglong Mee's avatar Kinglong Mee Committed by J. Bruce Fields

NFSD: Avoid warning message when compile at i686 arch

fs/nfsd/nfs4xdr.c: In function 'nfsd4_encode_readv':
>> fs/nfsd/nfs4xdr.c:3137:148: warning: comparison of distinct pointer types lacks a cast [enabled by default]
thislen = min(len, ((void *)xdr->end - (void *)xdr->p));
Reported-by: default avatarFengguang Wu <fengguang.wu@intel.com>
Signed-off-by: default avatarKinglong Mee <kinglongmee@gmail.com>
Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
parent d5e23383
...@@ -3140,7 +3140,7 @@ static __be32 nfsd4_encode_readv(struct nfsd4_compoundres *resp, ...@@ -3140,7 +3140,7 @@ static __be32 nfsd4_encode_readv(struct nfsd4_compoundres *resp,
len = maxcount; len = maxcount;
v = 0; v = 0;
thislen = min(len, ((void *)xdr->end - (void *)xdr->p)); thislen = min_t(long, len, ((void *)xdr->end - (void *)xdr->p));
p = xdr_reserve_space(xdr, (thislen+3)&~3); p = xdr_reserve_space(xdr, (thislen+3)&~3);
WARN_ON_ONCE(!p); WARN_ON_ONCE(!p);
resp->rqstp->rq_vec[v].iov_base = p; resp->rqstp->rq_vec[v].iov_base = p;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment