Skip to contentSkip to conversation

Add writepages for GFS2 jdata

Cluster-devel Steven Whitehouse 1 participant 1 message Oct 17, 2007 GFS2 file system

lore
Share & tools
lore
#0 lore raw

From 58a874d0bd9013ddc2c9085736fc656fd74120da Mon Sep 17 00:00:00 2001
From: Steven Whitehouse <[email protected]>
Date: Wed, 17 Oct 2007 09:04:24 +0100
Subject: [PATCH] [GFS2] Add writepages for GFS2 jdata

This patch resolves a lock ordering issue where we had been getting a transaction lock in the wrong order with respect to the page lock. By using writepages rather than just writepage, it is then possible to start a transaction before locking the page, and thus matching the locking order elsewhere in the code.

fs/gfs2/log.c +1 -1
index 70b404d..1e1fe8d 100644
@@ -650,7 +650,7 @@ static void gfs2_ordered_write(struct gfs2_sbd *sdp)
 		get_bh(bh);
 		gfs2_log_unlock(sdp);
 		lock_buffer(bh);
-		if (test_clear_buffer_dirty(bh)) {
+		if (buffer_mapped(bh) && test_clear_buffer_dirty(bh)) {
 			bh->b_end_io = end_buffer_write_sync;
 			submit_bh(WRITE, bh);
 		} else {
fs/gfs2/ops_address.c +205 -8

254 lines not on this page · raw message

Signature · 1 line
1.5.1.2