patch-2.4.20 linux-2.4.20/fs/ext2/inode.c
Next file: linux-2.4.20/fs/ext2/ioctl.c
Previous file: linux-2.4.20/fs/ext2/ialloc.c
Back to the patch index
Back to the overall index
- Lines: 39
- Date:
Thu Nov 28 15:53:15 2002
- Orig file:
linux-2.4.19/fs/ext2/inode.c
- Orig date:
Fri Aug 2 17:39:45 2002
diff -urN linux-2.4.19/fs/ext2/inode.c linux-2.4.20/fs/ext2/inode.c
@@ -408,9 +408,13 @@
unlock_buffer(bh);
mark_buffer_dirty_inode(bh, inode);
/* We used to sync bh here if IS_SYNC(inode).
- * But we now rely upon generic_osync_inode()
+ * But for S_ISREG files we now rely upon generic_osync_inode()
* and b_inode_buffers
*/
+ if (S_ISDIR(inode->i_mode) && IS_SYNC(inode)) {
+ ll_rw_block (WRITE, 1, &bh);
+ wait_on_buffer (bh);
+ }
parent = nr;
}
if (n == num)
@@ -469,8 +473,13 @@
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 (S_ISDIR(inode->i_mode) && IS_SYNC(inode)) {
+ ll_rw_block(WRITE, 1, &where->bh);
+ wait_on_buffer(where->bh);
+ }
+ }
mark_inode_dirty(inode);
return 0;
@@ -1094,7 +1103,7 @@
raw_inode->i_frag = inode->u.ext2_i.i_frag_no;
raw_inode->i_fsize = inode->u.ext2_i.i_frag_size;
raw_inode->i_file_acl = cpu_to_le32(inode->u.ext2_i.i_file_acl);
- if (S_ISDIR(inode->i_mode))
+ if (!S_ISREG(inode->i_mode))
raw_inode->i_dir_acl = cpu_to_le32(inode->u.ext2_i.i_dir_acl);
else {
raw_inode->i_size_high = cpu_to_le32(inode->i_size >> 32);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)