lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 16 Oct 2008 15:33:02 +0530
From:	"Manish Katiyar" <mkatiyar@...il.com>
To:	"Theodore Tso" <tytso@....edu>, ext4 <linux-ext4@...r.kernel.org>
Cc:	mkatiyar@...il.com
Subject: [PATCH] ext4: Remove compilation warnings in fs/ext4/mballoc.c

Hi Ted,

Below patch fixes the following compilation warnings
fs/ext4/mballoc.c:2717: warning: unused variable 'proc'
fs/ext4/mballoc.c:2715: warning: unused variable 'mode'

I think a cleaner fix would be to call these functions only when
CONFIG_PROC_FS is set and cleanup EXT4_PROC_HANDLER to be always
defined . Also since s_proc in sb only makes sense when procfs is
configured should that also be ifdef'd in the structure itself ??
Let me know if these cleanup can be done in a better way (or the way
you would prefer :-) . I can do this.


Signed-off-by: Manish Katiyar <mkatiyar@...il.com>
---
 fs/ext4/mballoc.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index b580714..c88b5ab 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -2712,12 +2712,14 @@ ext4_mb_free_committed_blocks(struct super_block *sb)

 static int ext4_mb_init_per_dev_proc(struct super_block *sb)
 {
+#ifdef CONFIG_PROC_FS
 	mode_t mode = S_IFREG | S_IRUGO | S_IWUSR;
 	struct ext4_sb_info *sbi = EXT4_SB(sb);
 	struct proc_dir_entry *proc;

 	if (sbi->s_proc == NULL)
 		return -EINVAL;
+#endif

 	EXT4_PROC_HANDLER(EXT4_MB_STATS_NAME, mb_stats);
 	EXT4_PROC_HANDLER(EXT4_MB_MAX_TO_SCAN_NAME, mb_max_to_scan);
@@ -2739,10 +2741,12 @@ err_out:

 static int ext4_mb_destroy_per_dev_proc(struct super_block *sb)
 {
+#ifdef CONFIG_PROC_FS
 	struct ext4_sb_info *sbi = EXT4_SB(sb);

 	if (sbi->s_proc == NULL)
 		return -EINVAL;
+#endif

 	remove_proc_entry(EXT4_MB_GROUP_PREALLOC, sbi->s_proc);
 	remove_proc_entry(EXT4_MB_STREAM_REQ, sbi->s_proc);
-- 
1.5.4.3


Thanks -
Manish
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ