Re: [PATCH v3] [SIGNED-OFF] ext4: don't work without procfs

From: Olaf Titz
Date: Thu Oct 06 2011 - 15:06:00 EST


> It would make more sense as:
>
> +#ifdef CONFIG_PROC_FS
> ext4_proc_root = proc_mkdir("fs/ext4", NULL);
> if (!ext4_proc_root)
> goto out5;
> +#endif

Looks right, but even more logical would be to guard _all_ usage of
ext4_proc_root (and, consequently, the declaration thereof) in #ifdef
CONFIG_PROC_FS. Now it's at least necessary to always do null checks.

Olaf
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/