All of lore.kernel.org
 help / color / mirror / Atom feed
* [Ocfs2-devel] [PATCH] ocfs2: Remove pointless assignment in ocfs2_init()
@ 2014-10-21 15:02 Jan Kara
  2014-11-06  2:02 ` Joseph Qi
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Kara @ 2014-10-21 15:02 UTC (permalink / raw)
  To: ocfs2-devel

Remove assignment which is never used.

Coverity-id: 1227009
Signed-off-by: Jan Kara <jack@suse.cz>
---
 fs/ocfs2/super.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c
index 93c85bc745e1..e1be0f0ea411 100644
--- a/fs/ocfs2/super.c
+++ b/fs/ocfs2/super.c
@@ -1621,10 +1621,8 @@ static int __init ocfs2_init(void)
 	}
 
 	ocfs2_debugfs_root = debugfs_create_dir("ocfs2", NULL);
-	if (!ocfs2_debugfs_root) {
-		status = -EFAULT;
+	if (!ocfs2_debugfs_root)
 		mlog(ML_ERROR, "Unable to create ocfs2 debugfs root.\n");
-	}
 
 	ocfs2_set_locking_protocol();
 
-- 
1.8.1.4

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

* [Ocfs2-devel] [PATCH] ocfs2: Remove pointless assignment in ocfs2_init()
  2014-10-21 15:02 [Ocfs2-devel] [PATCH] ocfs2: Remove pointless assignment in ocfs2_init() Jan Kara
@ 2014-11-06  2:02 ` Joseph Qi
  2014-11-06  6:46   ` Jan Kara
  0 siblings, 1 reply; 3+ messages in thread
From: Joseph Qi @ 2014-11-06  2:02 UTC (permalink / raw)
  To: ocfs2-devel

Does it mean we can ignore the failure of creating debugfs?

On 2014/10/21 23:02, Jan Kara wrote:
> Remove assignment which is never used.
> 
> Coverity-id: 1227009
> Signed-off-by: Jan Kara <jack@suse.cz>
> ---
>  fs/ocfs2/super.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c
> index 93c85bc745e1..e1be0f0ea411 100644
> --- a/fs/ocfs2/super.c
> +++ b/fs/ocfs2/super.c
> @@ -1621,10 +1621,8 @@ static int __init ocfs2_init(void)
>  	}
>  
>  	ocfs2_debugfs_root = debugfs_create_dir("ocfs2", NULL);
> -	if (!ocfs2_debugfs_root) {
> -		status = -EFAULT;
> +	if (!ocfs2_debugfs_root)
>  		mlog(ML_ERROR, "Unable to create ocfs2 debugfs root.\n");
> -	}
>  
>  	ocfs2_set_locking_protocol();
>  
> 

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

* [Ocfs2-devel] [PATCH] ocfs2: Remove pointless assignment in ocfs2_init()
  2014-11-06  2:02 ` Joseph Qi
@ 2014-11-06  6:46   ` Jan Kara
  0 siblings, 0 replies; 3+ messages in thread
From: Jan Kara @ 2014-11-06  6:46 UTC (permalink / raw)
  To: ocfs2-devel

On Thu 06-11-14 10:02:18, Joseph Qi wrote:
> Does it mean we can ignore the failure of creating debugfs?
  Yes, generally it's the case that debugfs is optional and filesystem can
function without it just fine. OTOH looking more into where
ocfs2_debugfs_root is used, failure to create ocfs2_debugfs_root will lead
to debugfs entries being created in the root directory of debugfs
filesystem which is confusing to say the least. So for simplicity it's
probably better to just bail out with ENOMEM when we fail to create the
root. I'll send an updated patch. Thanks for review!

								Honza
> 
> On 2014/10/21 23:02, Jan Kara wrote:
> > Remove assignment which is never used.
> > 
> > Coverity-id: 1227009
> > Signed-off-by: Jan Kara <jack@suse.cz>
> > ---
> >  fs/ocfs2/super.c | 4 +---
> >  1 file changed, 1 insertion(+), 3 deletions(-)
> > 
> > diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c
> > index 93c85bc745e1..e1be0f0ea411 100644
> > --- a/fs/ocfs2/super.c
> > +++ b/fs/ocfs2/super.c
> > @@ -1621,10 +1621,8 @@ static int __init ocfs2_init(void)
> >  	}
> >  
> >  	ocfs2_debugfs_root = debugfs_create_dir("ocfs2", NULL);
> > -	if (!ocfs2_debugfs_root) {
> > -		status = -EFAULT;
> > +	if (!ocfs2_debugfs_root)
> >  		mlog(ML_ERROR, "Unable to create ocfs2 debugfs root.\n");
> > -	}
> >  
> >  	ocfs2_set_locking_protocol();
> >  
> > 
> 
> 
-- 
Jan Kara <jack@suse.cz>
SUSE Labs, CR

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

end of thread, other threads:[~2014-11-06  6:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-21 15:02 [Ocfs2-devel] [PATCH] ocfs2: Remove pointless assignment in ocfs2_init() Jan Kara
2014-11-06  2:02 ` Joseph Qi
2014-11-06  6:46   ` Jan Kara

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.