diff options
author | zack <zack@FreeBSD.org> | 2011-03-30 01:10:11 +0000 |
---|---|---|
committer | zack <zack@FreeBSD.org> | 2011-03-30 01:10:11 +0000 |
commit | a9eba0596c4e413de61c0d0960d01c83a16b0feb (patch) | |
tree | 15a55d3d14e6727a042fb8b2e8db41dd19854ed4 /sys/fs/nfsclient/nfs_clrpcops.c | |
parent | 24a0f968ca05de3f4d12a803e9141af94f6d0aee (diff) | |
download | FreeBSD-src-a9eba0596c4e413de61c0d0960d01c83a16b0feb.zip FreeBSD-src-a9eba0596c4e413de61c0d0960d01c83a16b0feb.tar.gz |
This patch fixes the Experimental NFS client to properly deal with 32 bit or 64
bit fileid's in NFSv2 and NFSv3. Without this fix, invalid casting (and sign
extension) was creating problems for any fileid greater than 2^31.
We discovered this because we have test clusters with more than 2 billion
allocated files and 64-bit ino_t's (and friend structures).
Reviewed by: rmacklem
Approved by: zml (mentor)
MFC after: 2 weeks
Diffstat (limited to 'sys/fs/nfsclient/nfs_clrpcops.c')
-rw-r--r-- | sys/fs/nfsclient/nfs_clrpcops.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/fs/nfsclient/nfs_clrpcops.c b/sys/fs/nfsclient/nfs_clrpcops.c index 2512ad4..37e1b81 100644 --- a/sys/fs/nfsclient/nfs_clrpcops.c +++ b/sys/fs/nfsclient/nfs_clrpcops.c @@ -2738,9 +2738,9 @@ nfsrpc_readdir(vnode_t vp, struct uio *uiop, nfsuint64 *cookiep, len = fxdr_unsigned(int, *tl); } else if (nd->nd_flag & ND_NFSV3) { NFSM_DISSECT(tl, u_int32_t *, 3*NFSX_UNSIGNED); - nfsva.na_fileid = - fxdr_unsigned(long, *++tl); - len = fxdr_unsigned(int, *++tl); + nfsva.na_fileid = fxdr_hyper(tl); + tl += 2; + len = fxdr_unsigned(int, *tl); } else { NFSM_DISSECT(tl, u_int32_t *, 2*NFSX_UNSIGNED); nfsva.na_fileid = |