patch-2.4.4 linux/fs/ext2/inode.c
Next file: linux/fs/ext2/super.c
Previous file: linux/fs/exec.c
Back to the patch index
Back to the overall index
- Lines: 58
- Date:
Thu Apr 26 10:44:10 2001
- Orig file:
v2.4.3/linux/fs/ext2/inode.c
- Orig date:
Fri Mar 23 12:15:29 2001
diff -u --recursive --new-file v2.4.3/linux/fs/ext2/inode.c linux/fs/ext2/inode.c
@@ -397,13 +397,13 @@
* the pointer to new one, then send parent to disk.
*/
bh = getblk(inode->i_dev, parent, blocksize);
- if (!buffer_uptodate(bh))
- wait_on_buffer(bh);
+ lock_buffer(bh);
memset(bh->b_data, 0, blocksize);
branch[n].bh = bh;
branch[n].p = (u32*) bh->b_data + offsets[n];
*branch[n].p = branch[n].key;
mark_buffer_uptodate(bh, 1);
+ unlock_buffer(bh);
mark_buffer_dirty_inode(bh, inode);
if (IS_SYNC(inode) || inode->u.ext2_i.i_osync) {
ll_rw_block (WRITE, 1, &bh);
@@ -568,7 +568,7 @@
changed:
while (partial > chain) {
- bforget(partial->bh);
+ brelse(partial->bh);
partial--;
}
goto reread;
@@ -587,10 +587,10 @@
struct buffer_head *bh;
bh = getblk(dummy.b_dev, dummy.b_blocknr, inode->i_sb->s_blocksize);
if (buffer_new(&dummy)) {
- if (!buffer_uptodate(bh))
- wait_on_buffer(bh);
+ lock_buffer(bh);
memset(bh->b_data, 0, inode->i_sb->s_blocksize);
mark_buffer_uptodate(bh, 1);
+ unlock_buffer(bh);
mark_buffer_dirty_inode(bh, inode);
}
return bh;
@@ -799,8 +799,8 @@
/* Writer: ->i_blocks */
inode->i_blocks -= blocks * count;
/* Writer: end */
- ext2_free_blocks (inode, block_to_free, count);
mark_inode_dirty(inode);
+ ext2_free_blocks (inode, block_to_free, count);
free_this:
block_to_free = nr;
count = 1;
@@ -811,8 +811,8 @@
/* Writer: ->i_blocks */
inode->i_blocks -= blocks * count;
/* Writer: end */
- ext2_free_blocks (inode, block_to_free, count);
mark_inode_dirty(inode);
+ ext2_free_blocks (inode, block_to_free, count);
}
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)