Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 153666
b: refs/heads/master
c: e06b640
h: refs/heads/master
v: v3
  • Loading branch information
Chuck Lever authored and J. Bruce Fields committed Apr 28, 2009
1 parent 529215e commit 02eaddf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 261758b5c3dfeac73ca364c47ed538f5ce4250ee
refs/heads/master: e06b64050ebea1220bca3c291d0431f5206b5c95
14 changes: 9 additions & 5 deletions trunk/fs/nfsd/nfsctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -695,8 +695,9 @@ static ssize_t write_threads(struct file *file, char *buf, size_t size)
if (rv)
return rv;
}
sprintf(buf, "%d\n", nfsd_nrthreads());
return strlen(buf);

return scnprintf(buf, SIMPLE_TRANSACTION_LIMIT, "%d\n",
nfsd_nrthreads());
}

/**
Expand Down Expand Up @@ -1197,7 +1198,9 @@ static ssize_t write_maxblksize(struct file *file, char *buf, size_t size)
nfsd_max_blksize = bsize;
mutex_unlock(&nfsd_mutex);
}
return sprintf(buf, "%d\n", nfsd_max_blksize);

return scnprintf(buf, SIMPLE_TRANSACTION_LIMIT, "%d\n",
nfsd_max_blksize);
}

#ifdef CONFIG_NFSD_V4
Expand All @@ -1221,8 +1224,9 @@ static ssize_t __write_leasetime(struct file *file, char *buf, size_t size)
return -EINVAL;
nfs4_reset_lease(lease);
}
sprintf(buf, "%ld\n", nfs4_lease_time());
return strlen(buf);

return scnprintf(buf, SIMPLE_TRANSACTION_LIMIT, "%ld\n",
nfs4_lease_time());
}

/**
Expand Down

0 comments on commit 02eaddf

Please sign in to comment.