patch-2.4.19 linux-2.4.19/fs/ext2/inode.c
Next file: linux-2.4.19/fs/ext3/balloc.c
Previous file: linux-2.4.19/fs/exec.c
Back to the patch index
Back to the overall index
- Lines: 62
- Date:
Fri Aug 2 17:39:45 2002
- Orig file:
linux-2.4.18/fs/ext2/inode.c
- Orig date:
Mon Feb 25 11:38:08 2002
diff -urN linux-2.4.18/fs/ext2/inode.c linux-2.4.19/fs/ext2/inode.c
@@ -407,10 +407,10 @@
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);
- wait_on_buffer (bh);
- }
+ /* We used to sync bh here if IS_SYNC(inode).
+ * But we now rely upon generic_osync_inode()
+ * and b_inode_buffers
+ */
parent = nr;
}
if (n == num)
@@ -469,18 +469,10 @@
inode->i_ctime = CURRENT_TIME;
/* had we spliced it onto indirect block? */
- if (where->bh) {
+ if (where->bh)
mark_buffer_dirty_inode(where->bh, inode);
- if (IS_SYNC(inode) || inode->u.ext2_i.i_osync) {
- ll_rw_block (WRITE, 1, &where->bh);
- wait_on_buffer(where->bh);
- }
- }
- if (IS_SYNC(inode) || inode->u.ext2_i.i_osync)
- ext2_sync_inode (inode);
- else
- mark_inode_dirty(inode);
+ mark_inode_dirty(inode);
return 0;
changed:
@@ -837,10 +829,6 @@
(u32*)partial->bh->b_data + addr_per_block,
(chain+n-1) - partial);
mark_buffer_dirty_inode(partial->bh, inode);
- if (IS_SYNC(inode)) {
- ll_rw_block (WRITE, 1, &partial->bh);
- wait_on_buffer (partial->bh);
- }
brelse (partial->bh);
partial--;
}
@@ -872,10 +860,12 @@
;
}
inode->i_mtime = inode->i_ctime = CURRENT_TIME;
- if (IS_SYNC(inode))
+ if (IS_SYNC(inode)) {
+ fsync_inode_buffers(inode);
ext2_sync_inode (inode);
- else
+ } else {
mark_inode_dirty(inode);
+ }
}
void ext2_read_inode (struct inode * inode)
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)