summaryrefslogtreecommitdiffstats
path: root/fs/nfs/mount_clnt.c
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2008-06-30 02:16:50 +0200
committerPaul Mackerras <paulus@samba.org>2008-06-30 02:16:50 +0200
commite9a4b6a3f6592862a67837e80aad3f50468857a6 (patch)
tree087420cf91ac922c7e99757c4490a605ec7b10f2 /fs/nfs/mount_clnt.c
parentMerge branch 'next' of master.kernel.org:/pub/scm/linux/kernel/git/jwboyer/po... (diff)
parentMerge git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb (diff)
downloadlinux-e9a4b6a3f6592862a67837e80aad3f50468857a6.tar.xz
linux-e9a4b6a3f6592862a67837e80aad3f50468857a6.zip
Merge branch 'linux-2.6'
Diffstat (limited to 'fs/nfs/mount_clnt.c')
-rw-r--r--fs/nfs/mount_clnt.c5
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