[patch 2/4] reiser4: lock wb-list when calling writeback_sb_inodes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Lock the wb-list, when calling writeback_sb_inodes()

Signed-off-by: Edward Shishkin <edward.shishkin@xxxxxxxxx>
---
 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;
 

[Index of Archives]     [Linux File System Development]     [Linux BTRFS]     [Linux NFS]     [Linux Filesystems]     [Ext4 Filesystem]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Resources]

  Powered by Linux