patch-2.4.17 linux/drivers/block/loop.c
Next file: linux/drivers/block/nbd.c
Previous file: linux/drivers/block/floppy.c
Back to the patch index
Back to the overall index
- Lines: 20
- Date:
Fri Dec 21 16:40:32 2001
- Orig file:
linux-2.4.16/drivers/block/loop.c
- Orig date:
Mon Nov 19 22:48:02 2001
diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.16/drivers/block/loop.c linux/drivers/block/loop.c
@@ -578,6 +578,8 @@
atomic_inc(&lo->lo_pending);
spin_unlock_irq(&lo->lo_lock);
+ current->flags |= PF_NOIO;
+
/*
* up sem, we are running
*/
@@ -640,6 +642,10 @@
if (S_ISBLK(inode->i_mode)) {
lo_device = inode->i_rdev;
+ if (lo_device == dev) {
+ error = -EBUSY;
+ goto out;
+ }
} else if (S_ISREG(inode->i_mode)) {
struct address_space_operations *aops = inode->i_mapping->a_ops;
/*
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)