patch-1.3.69 linux/drivers/block/loop.c
Next file: linux/drivers/block/loop.h
Previous file: linux/drivers/block/ll_rw_blk.c
Back to the patch index
Back to the overall index
- Lines: 44
- Date:
Mon Feb 26 13:26:28 1996
- Orig file:
v1.3.68/linux/drivers/block/loop.c
- Orig date:
Fri Feb 23 13:54:34 1996
diff -u --recursive --new-file v1.3.68/linux/drivers/block/loop.c linux/drivers/block/loop.c
@@ -29,7 +29,7 @@
#include "des.h"
#endif
-#define DEFAULT_MAJOR_NR 28
+#define DEFAULT_MAJOR_NR 10
int loop_major = DEFAULT_MAJOR_NR;
#define MAJOR_NR loop_major /* not necessarily constant */
@@ -225,15 +225,8 @@
brelse(bh);
goto error_out;
}
- if (CURRENT->cmd == WRITE) {
- set_bit(BH_Dirty, &bh->b_state);
- ll_rw_block(WRITE, 1, &bh);
- wait_on_buffer(bh);
- if (buffer_dirty(bh)) {
- brelse(bh);
- goto error_out;
- }
- }
+ if (CURRENT->cmd == WRITE)
+ mark_buffer_dirty(bh, 1);
brelse(bh);
dest_addr += size;
len -= size;
@@ -280,7 +273,7 @@
return -ENXIO;
if (lo->lo_refcnt > 1)
return -EBUSY;
- lo->lo_inode->i_count--;
+ iput(lo->lo_inode);
lo->lo_device = 0;
lo->lo_inode = NULL;
lo->lo_encrypt_type = 0;
@@ -288,6 +281,7 @@
lo->lo_encrypt_key_size = 0;
memset(lo->lo_encrypt_key, 0, LO_KEY_SIZE);
memset(lo->lo_name, 0, LO_NAME_SIZE);
+ loop_sizes[lo->lo_number] = 0;
invalidate_buffers(dev);
return 0;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov
with Sam's (original) version of this