Skip to content

Commit 0b09923

Browse files
mkatiyartytso
authored andcommitted
ext4: Remove compile warnings when building w/o CONFIG_PROC_FS
Signed-off-by: Manish Katiyar <[email protected]> Signed-off-by: "Theodore Ts'o" <[email protected]>
1 parent 5128273 commit 0b09923

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

fs/ext4/mballoc.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2720,6 +2720,7 @@ ext4_mb_free_committed_blocks(struct super_block *sb)
27202720

27212721
static int ext4_mb_init_per_dev_proc(struct super_block *sb)
27222722
{
2723+
#ifdef CONFIG_PROC_FS
27232724
mode_t mode = S_IFREG | S_IRUGO | S_IWUSR;
27242725
struct ext4_sb_info *sbi = EXT4_SB(sb);
27252726
struct proc_dir_entry *proc;
@@ -2743,10 +2744,14 @@ static int ext4_mb_init_per_dev_proc(struct super_block *sb)
27432744
remove_proc_entry(EXT4_MB_MAX_TO_SCAN_NAME, sbi->s_proc);
27442745
remove_proc_entry(EXT4_MB_STATS_NAME, sbi->s_proc);
27452746
return -ENOMEM;
2747+
#else
2748+
return 0;
2749+
#endif
27462750
}
27472751

27482752
static int ext4_mb_destroy_per_dev_proc(struct super_block *sb)
27492753
{
2754+
#ifdef CONFIG_PROC_FS
27502755
struct ext4_sb_info *sbi = EXT4_SB(sb);
27512756

27522757
if (sbi->s_proc == NULL)
@@ -2758,7 +2763,7 @@ static int ext4_mb_destroy_per_dev_proc(struct super_block *sb)
27582763
remove_proc_entry(EXT4_MB_MIN_TO_SCAN_NAME, sbi->s_proc);
27592764
remove_proc_entry(EXT4_MB_MAX_TO_SCAN_NAME, sbi->s_proc);
27602765
remove_proc_entry(EXT4_MB_STATS_NAME, sbi->s_proc);
2761-
2766+
#endif
27622767
return 0;
27632768
}
27642769

0 commit comments

Comments
 (0)