Commit cfbe7e4f authored by Shen Feng's avatar Shen Feng Committed by Theodore Ts'o

ext4: error proc entry creation when the fs/ext4 is not correctly created

When the directory fs/ext4 is not correctly created under proc, the entry
under this directory should not be created.
Signed-off-by: default avatarShen Feng <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarTheodore Ts'o <>
parent f795e140
......@@ -2661,6 +2661,10 @@ static int ext4_mb_init_per_dev_proc(struct super_block *sb)
struct proc_dir_entry *proc;
char devname[64];
if (proc_root_ext4 == NULL) {
sbi->s_mb_proc = NULL;
return -EINVAL;
bdevname(sb->s_bdev, devname);
sbi->s_mb_proc = proc_mkdir(devname, proc_root_ext4);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment