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