Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4b89eed93e0fa40a63e3d7b1796ec1337ea7a3aa
Commit:     4b89eed93e0fa40a63e3d7b1796ec1337ea7a3aa
Parent:     ecdfc9787fe527491baefc22dce8b2dbd5b2908d
Author:     Linus Torvalds <[EMAIL PROTECTED]>
AuthorDate: Fri Jan 26 12:53:20 2007 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Fri Jan 26 12:53:20 2007 -0800

    Write back inode data pages even when the inode itself is locked
    
    In __writeback_single_inode(), when we find a locked inode and we're not
    doing a data-integrity sync, we used to just skip writing entirely,
    since we didn't want to wait for the inode to unlock.
    
    However, there's really no reason to skip writing the data pages, which
    are likely to be the the bulk of the dirty state anyway (and the main
    reason why writeback was started for the non-data-integrity case, of
    course!)
    
    Acked-by: Nick Piggin <[EMAIL PROTECTED]>
    Cc: Andrew Morton <[EMAIL PROTECTED]>,
    Cc: Peter Zijlstra <[EMAIL PROTECTED]>
    Cc: Hugh Dickins <[EMAIL PROTECTED]>
    Cc: David Howells <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 fs/fs-writeback.c |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
index c403b66..a4b142a 100644
--- a/fs/fs-writeback.c
+++ b/fs/fs-writeback.c
@@ -251,8 +251,19 @@ __writeback_single_inode(struct inode *inode, struct 
writeback_control *wbc)
                WARN_ON(inode->i_state & I_WILL_FREE);
 
        if ((wbc->sync_mode != WB_SYNC_ALL) && (inode->i_state & I_LOCK)) {
+               struct address_space *mapping = inode->i_mapping;
+               int ret;
+
                list_move(&inode->i_list, &inode->i_sb->s_dirty);
-               return 0;
+
+               /*
+                * Even if we don't actually write the inode itself here,
+                * we can at least start some of the data writeout..
+                */
+               spin_unlock(&inode_lock);
+               ret = do_writepages(mapping, wbc);
+               spin_lock(&inode_lock);
+               return ret;
        }
 
        /*
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to