diff options
author | Jan Kara <jack@suse.cz> | 2008-06-24 11:43:00 +0200 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2008-06-24 11:43:00 +0200 |
commit | 19fd426a18b48a0446ba4b54ac66264916dcb7f3 (patch) | |
tree | b9e0f2bc35e746c14f5e5e5519ed79f1eb4b0f98 /fs/nfs/mount_clnt.c | |
parent | e8183c2452041326c95258ecc7865b6fcd91c730 (diff) | |
parent | 62786b9e81a2dbe9c073a2ade52d33a2627d6d85 (diff) |
Merge branch 'master' into for_mm
Diffstat (limited to 'fs/nfs/mount_clnt.c')
-rw-r--r-- | fs/nfs/mount_clnt.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/nfs/mount_clnt.c b/fs/nfs/mount_clnt.c index 49c7cd0502cc..779d2eb649c5 100644 --- a/fs/nfs/mount_clnt.c +++ b/fs/nfs/mount_clnt.c @@ -130,10 +130,11 @@ static int xdr_decode_fhstatus3(struct rpc_rqst *req, __be32 *p, struct mnt_fhstatus *res) { struct nfs_fh *fh = res->fh; + unsigned size; if ((res->status = ntohl(*p++)) == 0) { - int size = ntohl(*p++); - if (size <= NFS3_FHSIZE) { + size = ntohl(*p++); + if (size <= NFS3_FHSIZE && size != 0) { fh->size = size; memcpy(fh->data, p, size); } else |