linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: glommer@br.ibm.com (Glauber de Oliveira Costa)
To: ext2-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org,
	linux-fsdevel@vger.kernel.org, adilger@clusterfs.com,
	akpm@osdl.org, viro@parcelfarce.linux.theplanet.co.uk
Subject: [PATCH] ext3: use sbi instead of EXT3_SB() in resize code.
Date: Fri, 25 Nov 2005 17:36:31 -0200	[thread overview]
Message-ID: <20051125193631.GD19410@br.ibm.com> (raw)

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

There are places in the resize code in which EXT3_SB() macro is used
after an statement like sbi = EXT3_SB(sb) is done. Inside the same 
function, both sbi and EXT3_SB() are used to reference the super block
Altough it is not wrong, keeping it coherent increases legibility, IMHO.

Signed-off-by: Glauber de Oliveira Costa <glommer@br.ibm.com>
---
  


[-- Attachment #2: patch-ext3-sbi --]
[-- Type: text/plain, Size: 1831 bytes --]

--- linux-2.6.14.2-orig/fs/ext3/resize.c	2005-11-25 16:09:17.000000000 +0000
+++ linux-2.6.14.2-orig/fs/ext3/resize-sbi.c	2005-11-25 16:28:57.000000000 +0000
@@ -31,7 +31,7 @@ static int verify_group_input(struct sup
 	unsigned start = le32_to_cpu(es->s_blocks_count);
 	unsigned end = start + input->blocks_count;
 	unsigned group = input->group;
-	unsigned itend = input->inode_table + EXT3_SB(sb)->s_itb_per_group;
+	unsigned itend = input->inode_table + sbi->s_itb_per_group;
 	unsigned overhead = ext3_bg_has_super(sb, group) ?
 		(1 + ext3_bg_num_gdb(sb, group) +
 		 le16_to_cpu(es->s_reserved_gdt_blocks)) : 0;
@@ -754,7 +754,7 @@ int ext3_group_add(struct super_block *s
 	}
 
 	lock_super(sb);
-	if (input->group != EXT3_SB(sb)->s_groups_count) {
+	if (input->group != sbi->s_groups_count) {
 		ext3_warning(sb, __FUNCTION__,
 			     "multiple resizers run on filesystem!\n");
 		goto exit_journal;
@@ -788,7 +788,7 @@ int ext3_group_add(struct super_block *s
 	 * data.  So we need to be careful to set all of the relevant
 	 * group descriptor data etc. *before* we enable the group.
 	 *
-	 * The key field here is EXT3_SB(sb)->s_groups_count: as long as
+	 * The key field here is sbi->s_groups_count: as long as
 	 * that retains its old value, nobody is going to access the new
 	 * group.
 	 *
@@ -848,7 +848,7 @@ int ext3_group_add(struct super_block *s
 	smp_wmb();
 
 	/* Update the global fs size fields */
-	EXT3_SB(sb)->s_groups_count++;
+	sbi->s_groups_count++;
 
 	ext3_journal_dirty_metadata(handle, primary);
 
@@ -863,7 +863,7 @@ int ext3_group_add(struct super_block *s
 	percpu_counter_mod(&sbi->s_freeinodes_counter,
 			   EXT3_INODES_PER_GROUP(sb));
 
-	ext3_journal_dirty_metadata(handle, EXT3_SB(sb)->s_sbh);
+	ext3_journal_dirty_metadata(handle, sbi->s_sbh);
 	sb->s_dirt = 1;
 
 exit_journal:

                 reply	other threads:[~2005-11-25 19:36 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=20051125193631.GD19410@br.ibm.com \
    --to=glommer@br.ibm.com \
    --cc=adilger@clusterfs.com \
    --cc=akpm@osdl.org \
    --cc=ext2-devel@lists.sourceforge.net \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@parcelfarce.linux.theplanet.co.uk \
    /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).