linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Ted Tso <tytso@mit.edu>
Cc: Andreas Gruenbacher <agruenba@redhat.com>,
	linux-ext4@vger.kernel.org, Jan Kara <jack@suse.cz>
Subject: [PATCH 08/11] ext4: Kill ext4_mballoc_ready
Date: Mon, 22 Feb 2016 08:48:18 +0100	[thread overview]
Message-ID: <1456127301-7702-9-git-send-email-jack@suse.cz> (raw)
In-Reply-To: <1456127301-7702-1-git-send-email-jack@suse.cz>

From: Andreas Gruenbacher <agruenba@redhat.com>

This variable, introduced in commit 9c191f70, is unnecessary: it is set
once the module has been initialized correctly, and ext4_fill_super
cannot run unless the module has been initialized correctly.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Jan Kara <jack@suse.cz>
---
 fs/ext4/super.c | 14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)

diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index ecc37e103435..2f550519e0aa 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -55,7 +55,6 @@
 
 static struct ext4_lazy_init *ext4_li_info;
 static struct mutex ext4_li_mtx;
-static int ext4_mballoc_ready;
 static struct ratelimit_state ext4_mount_msg_ratelimit;
 
 static int ext4_load_journal(struct super_block *, struct ext4_super_block *,
@@ -3795,12 +3794,10 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
 	sbi->s_journal->j_commit_callback = ext4_journal_commit_callback;
 
 no_journal:
-	if (ext4_mballoc_ready) {
-		sbi->s_mb_cache = ext4_xattr_create_cache();
-		if (!sbi->s_mb_cache) {
-			ext4_msg(sb, KERN_ERR, "Failed to create an mb_cache");
-			goto failed_mount_wq;
-		}
+	sbi->s_mb_cache = ext4_xattr_create_cache();
+	if (!sbi->s_mb_cache) {
+		ext4_msg(sb, KERN_ERR, "Failed to create an mb_cache");
+		goto failed_mount_wq;
 	}
 
 	if ((DUMMY_ENCRYPTION_ENABLED(sbi) || ext4_has_feature_encrypt(sb)) &&
@@ -5361,8 +5358,6 @@ static int __init ext4_init_fs(void)
 	err = ext4_init_mballoc();
 	if (err)
 		goto out2;
-	else
-		ext4_mballoc_ready = 1;
 	err = init_inodecache();
 	if (err)
 		goto out1;
@@ -5378,7 +5373,6 @@ out:
 	unregister_as_ext3();
 	destroy_inodecache();
 out1:
-	ext4_mballoc_ready = 0;
 	ext4_exit_mballoc();
 out2:
 	ext4_exit_sysfs();
-- 
2.6.2


  parent reply	other threads:[~2016-02-22  7:48 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-22  7:48 [PATCH 0/11 v3] ext[24]: MBCache rewrite Jan Kara
2016-02-22  7:48 ` [PATCH 01/11] mbcache2: Reimplement mbcache Jan Kara
2016-02-22  7:48 ` [PATCH 02/11] ext4: Convert to mbcache2 Jan Kara
2016-02-22  7:48 ` [PATCH 03/11] ext2: " Jan Kara
2016-02-22  7:48 ` [PATCH 04/11] mbcache: Remove Jan Kara
2016-02-22  7:48 ` [PATCH 05/11] mbcache2: Limit cache size Jan Kara
2016-02-22  7:48 ` [PATCH 06/11] mbcache2: Use referenced bit instead of LRU Jan Kara
2016-02-22  7:48 ` [PATCH 07/11] mbcache2: Rename to mbcache Jan Kara
2016-02-22  7:48 ` Jan Kara [this message]
2016-02-22  7:48 ` [PATCH 09/11] mbcache: Get rid of _e_hash_list_head Jan Kara
2016-02-22  7:48 ` [PATCH 10/11] ext4: Shortcut setting of xattr to the same value Jan Kara
2016-02-22  7:48 ` [PATCH 11/11] mbcache: Add reusable flag to cache entries Jan Kara
2016-02-22 16:31 ` [PATCH 0/11 v3] ext[24]: MBCache rewrite Theodore Ts'o
2016-02-22 18:45   ` Jan Kara

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=1456127301-7702-9-git-send-email-jack@suse.cz \
    --to=jack@suse.cz \
    --cc=agruenba@redhat.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    /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 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).