patch-2.1.71 linux/drivers/block/nbd.c
Next file: linux/drivers/block/opti621.c
Previous file: linux/drivers/block/ide.h
Back to the patch index
Back to the overall index
-  Lines: 35
-  Date:
Wed Dec  3 15:26:21 1997
-  Orig file: 
v2.1.70/linux/drivers/block/nbd.c
-  Orig date: 
Tue Dec  2 09:49:39 1997
diff -u --recursive --new-file v2.1.70/linux/drivers/block/nbd.c linux/drivers/block/nbd.c
@@ -78,7 +78,7 @@
 	oldfs = get_fs();
 	set_fs(get_ds());
 	do {
-		int save;
+		sigset_t oldset;
 
 		iov.iov_base = buf;
 		iov.iov_len = size;
@@ -91,13 +91,22 @@
 		msg.msg_namelen = 0;
 		msg.msg_flags = 0;
 
-		save = current->blocked;
-		current->blocked = ~0UL;
+		spin_lock_irq(¤t->sigmask_lock);
+		oldset = current->blocked;
+		sigfillset(¤t->blocked);
+		recalc_sigpending(current);
+		spin_unlock_irq(¤t->sigmask_lock);
+
 		if (send)
 			result = sock_sendmsg(sock, &msg, size);
 		else
 			result = sock_recvmsg(sock, &msg, size, 0);
-		current->blocked = save;
+
+		spin_lock_irq(¤t->sigmask_lock);
+		current->blocked = oldset;
+		recalc_sigpending(current);
+		spin_unlock_irq(¤t->sigmask_lock);
+
 		if (result <= 0) {
 #ifdef PARANOIA
 			printk(KERN_ERR "NBD: %s - sock=%d at buf=%d, size=%d returned %d.\n",
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov