]> err.no Git - linux-2.6/blobdiff - fs/fs-writeback.c
writeback: fix time ordering of the per superblock dirty inode lists 7
[linux-2.6] / fs / fs-writeback.c
index 1b43cc9d9ebb405d61f3906d850adc1e9c487451..39fadfad86f7cf0f2991a0d7f8f612ec84eb453a 100644 (file)
@@ -308,7 +308,14 @@ __writeback_single_inode(struct inode *inode, struct writeback_control *wbc)
                struct address_space *mapping = inode->i_mapping;
                int ret;
 
-               redirty_tail(inode);
+               /*
+                * We're skipping this inode because it's locked, and we're not
+                * doing writeback-for-data-integrity.  Move it to the head of
+                * s_dirty so that writeback can proceed with the other inodes
+                * on s_io.  We'll have another go at writing back this inode
+                * when the s_dirty iodes get moved back onto s_io.
+                */
+               redirty_head(inode);
 
                /*
                 * Even if we don't actually write the inode itself here,
@@ -403,14 +410,14 @@ sync_sb_inodes(struct super_block *sb, struct writeback_control *wbc)
                        wbc->encountered_congestion = 1;
                        if (!sb_is_blkdev_sb(sb))
                                break;          /* Skip a congested fs */
-                       list_move(&inode->i_list, &sb->s_dirty);
+                       redirty_head(inode);
                        continue;               /* Skip a congested blockdev */
                }
 
                if (wbc->bdi && bdi != wbc->bdi) {
                        if (!sb_is_blkdev_sb(sb))
                                break;          /* fs has the wrong queue */
-                       list_move(&inode->i_list, &sb->s_dirty);
+                       redirty_head(inode);
                        continue;               /* blockdev has wrong queue */
                }