diff options
Diffstat (limited to 'fs/nfsd')
-rw-r--r-- | fs/nfsd/nfssvc.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c index 07e4f5d7baa8..144d69918614 100644 --- a/fs/nfsd/nfssvc.c +++ b/fs/nfsd/nfssvc.c | |||
@@ -404,7 +404,6 @@ static int | |||
404 | nfsd(void *vrqstp) | 404 | nfsd(void *vrqstp) |
405 | { | 405 | { |
406 | struct svc_rqst *rqstp = (struct svc_rqst *) vrqstp; | 406 | struct svc_rqst *rqstp = (struct svc_rqst *) vrqstp; |
407 | struct fs_struct *fsp; | ||
408 | int err, preverr = 0; | 407 | int err, preverr = 0; |
409 | 408 | ||
410 | /* Lock module and set up kernel thread */ | 409 | /* Lock module and set up kernel thread */ |
@@ -413,13 +412,11 @@ nfsd(void *vrqstp) | |||
413 | /* At this point, the thread shares current->fs | 412 | /* At this point, the thread shares current->fs |
414 | * with the init process. We need to create files with a | 413 | * with the init process. We need to create files with a |
415 | * umask of 0 instead of init's umask. */ | 414 | * umask of 0 instead of init's umask. */ |
416 | fsp = copy_fs_struct(current->fs); | 415 | if (unshare_fs_struct() < 0) { |
417 | if (!fsp) { | ||
418 | printk("Unable to start nfsd thread: out of memory\n"); | 416 | printk("Unable to start nfsd thread: out of memory\n"); |
419 | goto out; | 417 | goto out; |
420 | } | 418 | } |
421 | exit_fs(current); | 419 | |
422 | current->fs = fsp; | ||
423 | current->fs->umask = 0; | 420 | current->fs->umask = 0; |
424 | 421 | ||
425 | /* | 422 | /* |