patch-2.4.6 linux/fs/minix/itree_common.c
Next file: linux/fs/namei.c
Previous file: linux/fs/locks.c
Back to the patch index
Back to the overall index
-  Lines: 16
-  Date:
Wed Jun 20 11:10:27 2001
-  Orig file: 
v2.4.5/linux/fs/minix/itree_common.c
-  Orig date: 
Sun Apr  8 12:30:59 2001
diff -u --recursive --new-file v2.4.5/linux/fs/minix/itree_common.c linux/fs/minix/itree_common.c
@@ -80,13 +80,13 @@
 			break;
 		branch[n].key = cpu_to_block(nr);
 		bh = getblk(inode->i_dev, parent, BLOCK_SIZE);
-		if (!buffer_uptodate(bh))
-			wait_on_buffer(bh);
+		lock_buffer(bh);
 		memset(bh->b_data, 0, BLOCK_SIZE);
 		branch[n].bh = bh;
 		branch[n].p = (block_t*) bh->b_data + offsets[n];
 		*branch[n].p = branch[n].key;
 		mark_buffer_uptodate(bh, 1);
+		unlock_buffer(bh);
 		mark_buffer_dirty(bh);
 		parent = nr;
 	}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)