ocfs2: Remove pointless assignment in ocfs2_init()
PATCH 1/1 ocfs2: Remove pointless assignment in ocfs2_init()
Remove assignment which is never used.
Coverity-id: 1227009
--- fs/ocfs2/super.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
fs/ocfs2/super.c +1 -3
@@ -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 ();
Signature · 1 line
1.8.1.4
PATCH 1/1 ocfs2: Remove pointless assignment in ocfs2_init()
Does it mean we can ignore the failure of creating debugfs?
Quoted 25 lines · Jan Kara
Remove assignment which is never used.
Coverity-id: 1227009
Signed-off-by Jan Kara <[email protected]>--- fs/ocfs2/super.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)fs/ocfs2/super.c +1
-3@@ -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 ();
PATCH 1/1 ocfs2: Remove pointless assignment in ocfs2_init()
Quoted 1 line · Joseph Qi
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
Quoted 29 lines · Jan Kara
Quoted 25 lines
Remove assignment which is never used.
Coverity-id: 1227009
Signed-off-by Jan Kara <[email protected]>--- fs/ocfs2/super.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)fs/ocfs2/super.c +1
-3@@ -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 ();
Signature · 2 lines
Jan Kara <[email protected]> SUSE Labs, CR