Signed-off-by: Nick Piggin <npiggin@xxxxxxx> Index: linux-2.6/fs/fs-writeback.c =================================================================== --- linux-2.6.orig/fs/fs-writeback.c +++ linux-2.6/fs/fs-writeback.c @@ -484,15 +484,17 @@ writeback_single_inode(struct inode *ino spin_lock(&inode->i_lock); dirty = inode->i_state & I_DIRTY; inode->i_state &= ~(I_DIRTY_SYNC | I_DIRTY_DATASYNC); - spin_unlock(&inode->i_lock); /* Don't write the inode if only I_DIRTY_PAGES was set */ if (dirty & (I_DIRTY_SYNC | I_DIRTY_DATASYNC)) { - int err = write_inode(inode, wbc); + int err; + + spin_unlock(&inode->i_lock); + err = write_inode(inode, wbc); if (ret == 0) ret = err; + spin_lock(&inode->i_lock); } - spin_lock(&inode->i_lock); spin_lock(&wb_inode_list_lock); inode->i_state &= ~I_SYNC; if (!(inode->i_state & (I_FREEING | I_CLEAR))) { Index: linux-2.6/fs/inode.c =================================================================== --- linux-2.6.orig/fs/inode.c +++ linux-2.6/fs/inode.c @@ -810,12 +810,9 @@ struct inode *new_inode(struct super_blo inode = alloc_inode(sb); if (inode) { - /* XXX: init as locked for speedup */ - spin_lock(&inode->i_lock); inode->i_ino = last_ino_get(); inode->i_state = 0; __inode_add_to_lists(sb, NULL, inode); - spin_unlock(&inode->i_lock); } return inode; } -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html