public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3] [SIGNED-OFF] ext4: don't work without procfs
@ 2011-10-06 15:51 Fabrice Jouhaud
  2011-10-06 16:01 ` Joe Perches
  0 siblings, 1 reply; 5+ messages in thread
From: Fabrice Jouhaud @ 2011-10-06 15:51 UTC (permalink / raw)
  To: linux-ext4; +Cc: tytso, adilger.kernel, linux-kernel, Yargil

From: Yargil <yargil@free.fr>

Regression from commit dd68314ccf3fb918c1fb6471817edbc60ece4b52
The problem come from the test of the return value of proc_mkdir
that is always false without procfs and abort the init of ext4.

Signed-off-by: Fabrice Jouhaud <yargil@free.fr>
---
 fs/ext4/super.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 44d0c8d..9b51b17 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -4985,8 +4985,10 @@ static int __init ext4_init_fs(void)
 	if (!ext4_kset)
 		goto out6;
 	ext4_proc_root = proc_mkdir("fs/ext4", NULL);
+#ifdef CONFIG_PROC_FS
 	if (!ext4_proc_root)
 		goto out5;
+#endif
 
 	err = ext4_init_feat_adverts();
 	if (err)
-- 
1.7.2.5


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v3] [SIGNED-OFF] ext4: don't work without procfs
  2011-10-06 15:51 [PATCH v3] [SIGNED-OFF] ext4: don't work without procfs Fabrice Jouhaud
@ 2011-10-06 16:01 ` Joe Perches
  2011-10-06 16:44   ` Ted Ts'o
                     ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Joe Perches @ 2011-10-06 16:01 UTC (permalink / raw)
  To: Fabrice Jouhaud; +Cc: linux-ext4, tytso, adilger.kernel, linux-kernel

On Thu, 2011-10-06 at 17:51 +0200, Fabrice Jouhaud wrote:
> From: Yargil <yargil@free.fr>

It would be better to use your full name on the "From: " line

> Regression from commit dd68314ccf3fb918c1fb6471817edbc60ece4b52
> The problem come from the test of the return value of proc_mkdir
> that is always false without procfs and abort the init of ext4.
> 
> Signed-off-by: Fabrice Jouhaud <yargil@free.fr>
> ---
>  fs/ext4/super.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/fs/ext4/super.c b/fs/ext4/super.c
> index 44d0c8d..9b51b17 100644
> --- a/fs/ext4/super.c
> +++ b/fs/ext4/super.c
> @@ -4985,8 +4985,10 @@ static int __init ext4_init_fs(void)
>  	if (!ext4_kset)
>  		goto out6;
>  	ext4_proc_root = proc_mkdir("fs/ext4", NULL);
> +#ifdef CONFIG_PROC_FS
>  	if (!ext4_proc_root)
>  		goto out5;
> +#endif

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



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v3] [SIGNED-OFF] ext4: don't work without procfs
  2011-10-06 16:01 ` Joe Perches
@ 2011-10-06 16:44   ` Ted Ts'o
  2011-10-06 18:44   ` Olaf Titz
  2011-10-07  8:30   ` Lukas Czerner
  2 siblings, 0 replies; 5+ messages in thread
From: Ted Ts'o @ 2011-10-06 16:44 UTC (permalink / raw)
  To: Joe Perches; +Cc: Fabrice Jouhaud, linux-ext4, adilger.kernel, linux-kernel

On Thu, Oct 06, 2011 at 09:01:18AM -0700, Joe Perches wrote:
> On Thu, 2011-10-06 at 17:51 +0200, Fabrice Jouhaud wrote:
> > From: Yargil <yargil@free.fr>
> 
> It would be better to use your full name on the "From: " line

In fact, in these cases I will normally copy the full name from
Signed-off-by to the From line before applying the patch.  (In general
the signed-off-by line and the From line should have the same contents.)

    		       	       	    	 - Ted

P.S.  Helpful tip: if you use emacs, try putting something like this
in your .emacs.el file:

(defun insert-signed-off-by ()
  (interactive)
  (insert "Signed-off-by: Fabrice Jouhaud" <yargil@free.fr>\n"))

(global-set-key "\^Cs" 'insert-signed-off-by)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v3] [SIGNED-OFF] ext4: don't work without procfs
  2011-10-06 16:01 ` Joe Perches
  2011-10-06 16:44   ` Ted Ts'o
@ 2011-10-06 18:44   ` Olaf Titz
  2011-10-07  8:30   ` Lukas Czerner
  2 siblings, 0 replies; 5+ messages in thread
From: Olaf Titz @ 2011-10-06 18:44 UTC (permalink / raw)
  To: linux-kernel

> 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v3] [SIGNED-OFF] ext4: don't work without procfs
  2011-10-06 16:01 ` Joe Perches
  2011-10-06 16:44   ` Ted Ts'o
  2011-10-06 18:44   ` Olaf Titz
@ 2011-10-07  8:30   ` Lukas Czerner
  2 siblings, 0 replies; 5+ messages in thread
From: Lukas Czerner @ 2011-10-07  8:30 UTC (permalink / raw)
  To: Joe Perches
  Cc: Fabrice Jouhaud, linux-ext4, tytso, adilger.kernel, linux-kernel

On Thu, 6 Oct 2011, Joe Perches wrote:

> On Thu, 2011-10-06 at 17:51 +0200, Fabrice Jouhaud wrote:
> > From: Yargil <yargil@free.fr>
> 
> It would be better to use your full name on the "From: " line
> 
> > Regression from commit dd68314ccf3fb918c1fb6471817edbc60ece4b52
> > The problem come from the test of the return value of proc_mkdir
> > that is always false without procfs and abort the init of ext4.
> > 
> > Signed-off-by: Fabrice Jouhaud <yargil@free.fr>
> > ---
> >  fs/ext4/super.c |    2 ++
> >  1 files changed, 2 insertions(+), 0 deletions(-)
> > 
> > diff --git a/fs/ext4/super.c b/fs/ext4/super.c
> > index 44d0c8d..9b51b17 100644
> > --- a/fs/ext4/super.c
> > +++ b/fs/ext4/super.c
> > @@ -4985,8 +4985,10 @@ static int __init ext4_init_fs(void)
> >  	if (!ext4_kset)
> >  		goto out6;
> >  	ext4_proc_root = proc_mkdir("fs/ext4", NULL);
> > +#ifdef CONFIG_PROC_FS
> >  	if (!ext4_proc_root)
> >  		goto out5;
> > +#endif
> 
> 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

Actually it does not really matter, important is not to check the
condition in case that proc is not configured in.

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

-- 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-10-07  8:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-06 15:51 [PATCH v3] [SIGNED-OFF] ext4: don't work without procfs Fabrice Jouhaud
2011-10-06 16:01 ` Joe Perches
2011-10-06 16:44   ` Ted Ts'o
2011-10-06 18:44   ` Olaf Titz
2011-10-07  8:30   ` Lukas Czerner

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