Commit 7cc9ee3d authored by Andrew Morton's avatar Andrew Morton Committed by Jaroslav Kysela

[PATCH] ext2 synchronous mount fix

The optimisation for synchronous mounts was only correct for S_ISREG
files.  Directories do not pass through generic_osync_inode() and we
still need to synchronously write out their indirect blocks.
parent c566bb56
......@@ -430,8 +430,12 @@ static int ext2_alloc_branch(struct inode *inode,
mark_buffer_dirty_inode(bh, inode);
/* We used to sync bh here if IS_SYNC(inode).
* But we now rely upon generic_osync_inode()
* and b_inode_buffers
* and b_inode_buffers. But not for directories.
*/
if (S_ISDIR(inode->i_mode) && IS_DIRSYNC(inode)) {
ll_rw_block(WRITE, 1, &bh);
wait_on_buffer(bh);
}
parent = nr;
}
if (n == num)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment