patch-2.2.11 linux/drivers/scsi/scsi_error.c

Next file: linux/drivers/scsi/sd.c
Previous file: linux/drivers/scsi/scsi.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.2.10/linux/drivers/scsi/scsi_error.c linux/drivers/scsi/scsi_error.c
@@ -1926,6 +1926,7 @@
 	int	               rtn;
 	struct semaphore sem = MUTEX_LOCKED;
         unsigned long flags;
+        struct fs_struct *fs;
 
 	lock_kernel();
 
@@ -1936,16 +1937,18 @@
 	 */
 	exit_mm(current);
 
-
 	current->session = 1;
 	current->pgrp = 1;
-        /*
-         * FIXME(eric) this is still a child process of the one that did the insmod.
-         * This needs to be attached to task[0] instead.
-         */
+	
+	/* Become as one with the init task */
+	
+	exit_fs(current);	/* current->fs->count--; */
+	fs = init_task.fs;
+	current->fs = fs;
+	atomic_inc(&fs->count);
 
 	siginitsetinv(&current->blocked, SHUTDOWN_SIGS);
-        current->fs->umask = 0;
+
 
 	/*
 	 * Set the name of this process.

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)