All of lore.kernel.org
 help / color / mirror / Atom feed
From: Edward Shishkin <edward.shishkin@gmail.com>
To: Reiserfs development mailing list <reiserfs-devel@vger.kernel.org>
Subject: [patch] reiser4: adjust to backing_dev_info cleanups
Date: Mon, 01 Jun 2015 17:39:29 +0200	[thread overview]
Message-ID: <556C7CB1.8060804@gmail.com> (raw)

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

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

Thanks,
Edward.

[-- Attachment #2: reiser4-adjust-to-backing_dev_info-cleanups.patch --]
[-- Type: text/x-patch, Size: 2967 bytes --]

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;
 		}

                 reply	other threads:[~2015-06-01 15:39 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=556C7CB1.8060804@gmail.com \
    --to=edward.shishkin@gmail.com \
    --cc=reiserfs-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.