aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@redhat.com>2010-08-06 18:00:33 -0400
committerJ. Bruce Fields <bfields@redhat.com>2010-08-06 18:00:33 -0400
commit7fa53cc872332b265bc5ba1266f39586f218ad4a (patch)
tree0583a66f8665581a7a9b613f30000e9093c9ff84 /fs/nfsd
parente844a7b9805a2b74cfd34c8604f5bba3e0869305 (diff)
nfsd: don't allow setting maxblksize after svc created
It's harmless to set this after the server is created, but also ineffective, since the value is only used at the time of svc_create_pooled(). So fail the attempt, in keeping with the pattern set by write_versions, write_{lease,grace}time and write_recoverydir. (This could break userspace that tried to write to nfsd/max_block_size between setting up sockets and starting the server. However, such code wouldn't have worked anyway, and I don't know of any examples--rpc.nfsd in nfs-utils, probably the only user of the interface, doesn't do that.) Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd')
-rw-r--r--fs/nfsd/nfsctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c
index 12f0ee7d1aba..b53b1d042f1f 100644
--- a/fs/nfsd/nfsctl.c
+++ b/fs/nfsd/nfsctl.c
@@ -1190,7 +1190,7 @@ static ssize_t write_maxblksize(struct file *file, char *buf, size_t size)
1190 bsize = NFSSVC_MAXBLKSIZE; 1190 bsize = NFSSVC_MAXBLKSIZE;
1191 bsize &= ~(1024-1); 1191 bsize &= ~(1024-1);
1192 mutex_lock(&nfsd_mutex); 1192 mutex_lock(&nfsd_mutex);
1193 if (nfsd_serv && nfsd_serv->sv_nrthreads) { 1193 if (nfsd_serv) {
1194 mutex_unlock(&nfsd_mutex); 1194 mutex_unlock(&nfsd_mutex);
1195 return -EBUSY; 1195 return -EBUSY;
1196 } 1196 }