diff mbox

[Bug,12579] ext4 filesystem hang

Message ID 20090214080733.99D5311D10A@picon.linux-foundation.org
State Superseded, archived
Headers show

Commit Message

bugme-daemon@bugzilla.kernel.org Feb. 14, 2009, 8:07 a.m. UTC
http://bugzilla.kernel.org/show_bug.cgi?id=12579





------- Comment #12 from aneesh.kumar@linux.vnet.ibm.com  2009-02-14 00:07 -------
On Fri, Feb 13, 2009 at 02:06:06PM -0800, bugme-daemon@bugzilla.kernel.org
wrote:
> http://bugzilla.kernel.org/show_bug.cgi?id=12579
> 
> 
> 
> 
> 
> ------- Comment #8 from sandeen@redhat.com  2009-02-13 14:06 -------
> Created an attachment (id=20238)
 --> (http://bugzilla.kernel.org/attachment.cgi?id=20238&action=view)
>  --> (http://bugzilla.kernel.org/attachment.cgi?id=20238&action=view)
> Tested patch
> 
> Patch from Aneesh, un-whitespace-mangled.
> 
> Ted, can you push this out?  Works great.  :)  We might want to ask the other
> reporter of something similar (next-20090206: deadlock on ext4) to test it too.
>  I'll ping him.
> 

I think this small changes is also needed.
diff mbox

Patch

diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index f743524..c80e038 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -2495,7 +2495,10 @@  static int ext4_da_writepages(struct address_space
*mapping,
                wbc->range_end  = LLONG_MAX;
                wbc->range_cyclic = 0;
                range_cyclic = 1;
-               cycled = 0;
+               if (index == 0)
+                       cycled = 1;
+               else
+                       cycled = 0;
        } else
                index = wbc->range_start >> PAGE_CACHE_SHIFT;