Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6:
Remove two unneeded exports and make two symbols static in fs/mpage.c
Cleanup after commit 585d3bc06f
Trim includes of fdtable.h
Don't crap into descriptor table in binfmt_som
Trim includes in binfmt_elf
Don't mess with descriptor table in load_elf_binary()
Get rid of indirect include of fs_struct.h
New helper - current_umask()
check_unsafe_exec() doesn't care about signal handlers sharing
New locking/refcounting for fs_struct
Take fs_struct handling to new file (fs/fs_struct.c)
Get rid of bumping fs_struct refcount in pivot_root(2)
Kill unsharing fs_struct in __set_personality()
This commit is contained in:
@@ -403,7 +403,6 @@ static int
|
||||
nfsd(void *vrqstp)
|
||||
{
|
||||
struct svc_rqst *rqstp = (struct svc_rqst *) vrqstp;
|
||||
struct fs_struct *fsp;
|
||||
int err, preverr = 0;
|
||||
|
||||
/* Lock module and set up kernel thread */
|
||||
@@ -412,13 +411,11 @@ nfsd(void *vrqstp)
|
||||
/* At this point, the thread shares current->fs
|
||||
* with the init process. We need to create files with a
|
||||
* umask of 0 instead of init's umask. */
|
||||
fsp = copy_fs_struct(current->fs);
|
||||
if (!fsp) {
|
||||
if (unshare_fs_struct() < 0) {
|
||||
printk("Unable to start nfsd thread: out of memory\n");
|
||||
goto out;
|
||||
}
|
||||
exit_fs(current);
|
||||
current->fs = fsp;
|
||||
|
||||
current->fs->umask = 0;
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user