patch-2.3.43 linux/drivers/block/loop.c
Next file: linux/drivers/block/md.c
Previous file: linux/drivers/block/ll_rw_blk.c
Back to the patch index
Back to the overall index
- Lines: 24
- Date:
Thu Feb 10 12:16:57 2000
- Orig file:
v2.3.42/linux/drivers/block/loop.c
- Orig date:
Fri Jan 21 18:19:16 2000
diff -u --recursive --new-file v2.3.42/linux/drivers/block/loop.c linux/drivers/block/loop.c
@@ -342,8 +342,8 @@
set_fs(old_fs);
if (retval < 0) {
- printk(KERN_WARNING "loop: cannot create block - FS write failed: code %d\n",
- retval);
+ printk(KERN_WARNING "loop: cannot create block - FS write failed: code %Zi\n",
+ retval);
return FALSE;
} else {
return TRUE;
@@ -386,7 +386,11 @@
a file structure */
lo->lo_backing_file = NULL;
} else if (S_ISREG(inode->i_mode)) {
- if (!inode->i_op->get_block) {
+ /*
+ * Total crap. We should just use pagecache instead of trying
+ * to redirect on block level.
+ */
+ if (!inode->i_mapping->a_ops->bmap) {
printk(KERN_ERR "loop: device has no block access/not implemented\n");
goto out_putf;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)