[patch] reiser4: adjust to backing_dev_info cleanups

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

 



This patch adjust reiser4 to the following cleanups (which went to 4.0):
http://comments.gmane.org/gmane.linux.kernel.mm/126636

Thanks,
Edward.
diff -u -r linux-3.19.8/fs/reiser4/entd.c linux-4.0.4/fs/reiser4/entd.c
--- linux-3.19.8/fs/reiser4/entd.c	2015-06-01 17:28:24.040010884 +0200
+++ linux-4.0.4/fs/reiser4/entd.c	2015-06-01 14:06:01.099574357 +0200
@@ -258,7 +258,7 @@
 		 * (via igrab), so that shutdown_super() will wait
 		 * (on reiser4_put_super) for entd completion.
 		 */
-		wb = &rq->mapping->backing_dev_info->wb;
+		wb = &inode_to_bdi(rq->mapping->host)->wb;
 
 		spin_lock(&wb->list_lock);
 		result = generic_writeback_sb_inodes(super,
diff -u -r linux-3.19.8/fs/reiser4/flush.c linux-4.0.4/fs/reiser4/flush.c
--- linux-3.19.8/fs/reiser4/flush.c	2015-06-01 17:28:24.043010909 +0200
+++ linux-4.0.4/fs/reiser4/flush.c	2015-06-01 13:59:18.362360470 +0200
@@ -474,7 +474,7 @@
 	struct backing_dev_info *bdi;
 
 	sb = reiser4_get_current_sb();
-	bdi = reiser4_get_super_fake(sb)->i_mapping->backing_dev_info;
+	bdi = inode_to_bdi(reiser4_get_super_fake(sb));
 	return bdi_write_congested(bdi);
 }
 
diff -u -r linux-3.19.8/fs/reiser4/plugin/file/file_conversion.c linux-4.0.4/fs/reiser4/plugin/file/file_conversion.c
--- linux-3.19.8/fs/reiser4/plugin/file/file_conversion.c	2015-06-01 17:28:24.055011009 +0200
+++ linux-4.0.4/fs/reiser4/plugin/file/file_conversion.c	2015-06-01 14:00:49.807093605 +0200
@@ -529,7 +529,7 @@
 	ctx = reiser4_init_context(inode->i_sb);
 	if (IS_ERR(ctx))
 		return PTR_ERR(ctx);
-	current->backing_dev_info = inode->i_mapping->backing_dev_info;
+	current->backing_dev_info = inode_to_bdi(inode);
 	init_dispatch_context(&cont);
 	mutex_lock(&inode->i_mutex);
 	/**
diff -u -r linux-3.19.8/fs/reiser4/super_ops.c linux-4.0.4/fs/reiser4/super_ops.c
--- linux-3.19.8/fs/reiser4/super_ops.c	2015-06-01 17:28:24.071011142 +0200
+++ linux-4.0.4/fs/reiser4/super_ops.c	2015-06-01 14:05:21.852267844 +0200
@@ -430,7 +430,7 @@
 			"reiser4_capture_super_block failed in write_super: %d",
 			ret);
 
-	wb = &reiser4_get_super_fake(super)->i_mapping->backing_dev_info->wb;
+	wb = &inode_to_bdi(reiser4_get_super_fake(super))->wb;
 	spin_lock(&wb->list_lock);
 	generic_writeback_sb_inodes(super, wb, &wbc, &work, true);
 	spin_unlock(&wb->list_lock);
diff -u -r linux-3.19.8/fs/reiser4/vfs_ops.c linux-4.0.4/fs/reiser4/vfs_ops.c
--- linux-3.19.8/fs/reiser4/vfs_ops.c	2015-06-01 17:28:24.075011176 +0200
+++ linux-4.0.4/fs/reiser4/vfs_ops.c	2015-06-01 14:04:33.372885989 +0200
@@ -144,7 +144,6 @@
 	long written = 0;
 	int repeats = 0;
 	int result;
-	struct address_space *mapping;
 
 	/*
 	 * Performs early flushing, trying to free some memory. If there
@@ -159,13 +158,12 @@
 	}
 
 	BUG_ON(reiser4_get_super_fake(sb) == NULL);
-	mapping = reiser4_get_super_fake(sb)->i_mapping;
 	do {
 		long nr_submitted = 0;
 		jnode *node = NULL;
 
 		/* do not put more requests to overload write queue */
-		if (bdi_write_congested(mapping->backing_dev_info)) {
+		if (bdi_write_congested(inode_to_bdi(reiser4_get_super_fake(sb)))) {
 			//blk_flush_plug(current);
 			break;
 		}

[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