[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1211391859-17399-4-git-send-email-aneesh.kumar@linux.vnet.ibm.com>
Date: Wed, 21 May 2008 23:14:17 +0530
From: "Aneesh Kumar K.V" <aneesh.kumar@...ux.vnet.ibm.com>
To: cmm@...ibm.com, tytso@....edu, sandeen@...hat.com
Cc: linux-ext4@...r.kernel.org,
"Aneesh Kumar K.V" <aneesh.kumar@...ux.vnet.ibm.com>
Subject: [PATCH] ext4: Fix delalloc sync hang with journal lock inversion
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@...ux.vnet.ibm.com>
---
fs/ext4/inode.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 46cc610..076d00f 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -1571,13 +1571,17 @@ static int ext4_da_writepages(struct address_space *mapping,
*/
if (wbc->nr_to_write > EXT4_MAX_WRITEBACK_PAGES)
wbc->nr_to_write = EXT4_MAX_WRITEBACK_PAGES;
- to_write -= wbc->nr_to_write;
+ to_write -= wbc->nr_to_write;
ret = mpage_da_writepages(mapping, wbc, ext4_da_get_block_write);
ext4_journal_stop(handle);
- to_write +=wbc->nr_to_write;
+ if (wbc->nr_to_write) {
+ /* We failed to write what we requested for */
+ to_write += wbc->nr_to_write;
+ break;
+ }
+ wbc->nr_to_write = to_write;
}
-
out_writepages:
wbc->nr_to_write = to_write;
wbc->range_cyclic = range_cyclic;
--
1.5.5.1.211.g65ea3.dirty
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists