aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/nfsd/nfsctl.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c
index 173c4dd3d7a8..498d763b9320 100644
--- a/fs/nfsd/nfsctl.c
+++ b/fs/nfsd/nfsctl.c
@@ -390,11 +390,13 @@ static ssize_t write_filehandle(struct file *file, char *buf, size_t size)
390 390
391 dname = mesg; 391 dname = mesg;
392 len = qword_get(&mesg, dname, size); 392 len = qword_get(&mesg, dname, size);
393 if (len <= 0) return -EINVAL; 393 if (len <= 0)
394 return -EINVAL;
394 395
395 path = dname+len+1; 396 path = dname+len+1;
396 len = qword_get(&mesg, path, size); 397 len = qword_get(&mesg, path, size);
397 if (len <= 0) return -EINVAL; 398 if (len <= 0)
399 return -EINVAL;
398 400
399 len = get_int(&mesg, &maxsize); 401 len = get_int(&mesg, &maxsize);
400 if (len) 402 if (len)
@@ -418,7 +420,8 @@ static ssize_t write_filehandle(struct file *file, char *buf, size_t size)
418 if (len) 420 if (len)
419 return len; 421 return len;
420 422
421 mesg = buf; len = SIMPLE_TRANSACTION_LIMIT; 423 mesg = buf;
424 len = SIMPLE_TRANSACTION_LIMIT;
422 qword_addhex(&mesg, &len, (char*)&fh.fh_base, fh.fh_size); 425 qword_addhex(&mesg, &len, (char*)&fh.fh_base, fh.fh_size);
423 mesg[-1] = '\n'; 426 mesg[-1] = '\n';
424 return mesg - buf; 427 return mesg - buf;