From: Jan Blunck Date: Fri, 15 Feb 2008 03:34:29 +0000 (-0800) Subject: Dont touch fs_struct in usermodehelper X-Git-Tag: v2.6.25-rc2~29 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=db74ece990ea59a9ec9f00f8881026059ef5caf5;p=linux-2.6 Dont touch fs_struct in usermodehelper This test seems to be unnecessary since we always have rootfs mounted before calling a usermodehelper. Signed-off-by: Andreas Gruenbacher Signed-off-by: Jan Blunck Acked-by: Christoph Hellwig Acked-by: Greg KH Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/kernel/kmod.c b/kernel/kmod.c index bb7df2a28b..22be3ff3f3 100644 --- a/kernel/kmod.c +++ b/kernel/kmod.c @@ -173,10 +173,7 @@ static int ____call_usermodehelper(void *data) */ set_user_nice(current, 0); - retval = -EPERM; - if (current->fs->root) - retval = kernel_execve(sub_info->path, - sub_info->argv, sub_info->envp); + retval = kernel_execve(sub_info->path, sub_info->argv, sub_info->envp); /* Exec failed? */ sub_info->retval = retval;