reiserfs-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch 2/4] reiser4: lock wb-list when calling writeback_sb_inodes
@ 2012-10-21 17:59 Edward Shishkin
  0 siblings, 0 replies; only message in thread
From: Edward Shishkin @ 2012-10-21 17:59 UTC (permalink / raw)
  To: reiserfs-devel

[-- Attachment #1: Type: text/plain, Size: 1 bytes --]



[-- Attachment #2: reiser4-lock-wb-list.patch --]
[-- Type: text/x-patch, Size: 1019 bytes --]

Lock the wb-list, when calling writeback_sb_inodes()

Signed-off-by: Edward Shishkin <edward.shishkin@gmail.com>
---
 fs/reiser4/entd.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

--- linux-3.5.3.orig/fs/reiser4/entd.c
+++ linux-3.5.3/fs/reiser4/entd.c
@@ -240,6 +240,7 @@ static void entd_flush(struct super_bloc
 
 	if (rq->wbc->nr_to_write > 0) {
 		long result;
+		struct bdi_writeback *wb;
 		struct wb_writeback_work work = {
 			.sb		= super,
 			.sync_mode	= WB_SYNC_NONE,
@@ -257,11 +258,15 @@ static void entd_flush(struct super_bloc
 		 * (via igrab), so that shutdown_super() will wait
 		 * (on reiser4_put_super) for entd completion.
 		 */
+		wb = &rq->mapping->backing_dev_info->wb;
+
+		spin_lock(&wb->list_lock);
 		result = generic_writeback_sb_inodes(super,
-				             &rq->mapping->backing_dev_info->wb,
+				             wb,
 					     rq->wbc,
 					     &work,
 					     true);
+		spin_unlock(&wb->list_lock);
 	}
 	rq->wbc->nr_to_write = ENTD_CAPTURE_APAGE_BURST;
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-10-21 17:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-21 17:59 [patch 2/4] reiser4: lock wb-list when calling writeback_sb_inodes Edward Shishkin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).