public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH][2.6.14-rc2] ext3: fix build warning if !quota
@ 2005-09-29  1:46 pinotj
  2005-09-29  1:57 ` Al Viro
  0 siblings, 1 reply; 5+ messages in thread
From: pinotj @ 2005-09-29  1:46 UTC (permalink / raw)
  To: linux-kernel

Hi,

(My first e-mail seems to be lost somewhere, here is a second try)

sbi is not used if quota is not defined. This leads to a useless
variable after preprocessing and a build warning.

This moves the declaration in right place.

 ------8<------
diff -Naur a/fs/ext3/super.c b/fs/ext3/super.c
--- a/fs/ext3/super.c	2005-09-29 00:28:16.000000000 +0000
+++ b/fs/ext3/super.c	2005-09-29 00:25:02.000000000 +0000
@@ -513,7 +513,6 @@
 static int ext3_show_options(struct seq_file *seq, struct vfsmount *vfs)
 {
 	struct super_block *sb = vfs->mnt_sb;
-	struct ext3_sb_info *sbi = EXT3_SB(sb);

 	if (test_opt(sb, DATA_FLAGS) == EXT3_MOUNT_JOURNAL_DATA)
 		seq_puts(seq, ",data=journal");
@@ -523,6 +522,8 @@
 		seq_puts(seq, ",data=writeback");

 #if defined(CONFIG_QUOTA)
+	struct ext3_sb_info *sbi = EXT3_SB(sb);
+
 	if (sbi->s_jquota_fmt)
 		seq_printf(seq, ",jqfmt=%s",
 		(sbi->s_jquota_fmt == QFMT_VFS_OLD) ? "vfsold": "vfsv0");
 ------8<------

Signed-off-by: Jerome Pinot <ngc891@gmail.com>


Regards,

--
Jerome Pinot
http://ngc891.blogdns.net/


^ permalink raw reply	[flat|nested] 5+ messages in thread
* Re: [PATCH][2.6.14-rc2] ext3: fix build warning if !quota
@ 2005-09-29  2:24 pinotj
  2005-09-29 10:10 ` Jan Kara
  0 siblings, 1 reply; 5+ messages in thread
From: pinotj @ 2005-09-29  2:24 UTC (permalink / raw)
  To: viro; +Cc: linux-kernel


>Date: Thu, 29 Sep 2005 02:57:20 +0100
>From: Al Viro
>To: pinotj
>Cc: linux-kernel
>Subject: Re: [PATCH][2.6.14-rc2] ext3: fix build warning if !quota
[...]
>.... and puts declaration in the middle of code.
>

Is this better ?

------8<------
diff -Naur a/fs/ext3/super.c b/fs/ext3/super.c
--- a/fs/ext3/super.c	2005-09-29 00:28:16.000000000 +0000
+++ b/fs/ext3/super.c	2005-09-29 02:18:22.000000000 +0000
@@ -513,7 +513,9 @@
 static int ext3_show_options(struct seq_file *seq, struct vfsmount *vfs)
 {
 	struct super_block *sb = vfs->mnt_sb;
+#if defined(CONFIG_QUOTA)
 	struct ext3_sb_info *sbi = EXT3_SB(sb);
+#endif
 
 	if (test_opt(sb, DATA_FLAGS) == EXT3_MOUNT_JOURNAL_DATA)
 		seq_puts(seq, ",data=journal");
------8<------


-- 
Jerome Pinot
http://ngc891.blogdns.net/


^ permalink raw reply	[flat|nested] 5+ messages in thread
[parent not found: <88ee31b7050928174557572f77@mail.gmail.com>]

end of thread, other threads:[~2005-09-29 16:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-29  1:46 [PATCH][2.6.14-rc2] ext3: fix build warning if !quota pinotj
2005-09-29  1:57 ` Al Viro
  -- strict thread matches above, loose matches on Subject: below --
2005-09-29  2:24 pinotj
2005-09-29 10:10 ` Jan Kara
     [not found] <88ee31b7050928174557572f77@mail.gmail.com>
2005-09-29 16:45 ` OGAWA Hirofumi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox