Skip to contentSkip to conversation

ocfs2: Fix bogus error message from ocfs2_global_read_info

PATCH New Jan Kara 2 participants 2 messages Feb 10, 2012 – Jul 4, 2012 OCFS2

lore
Share & tools
lore

Jan Kara

author
#0 lore raw

PATCH 1/1 ocfs2: Fix bogus error message from ocfs2_global_read_info

'status' variable in ocfs2_global_read_info() is always != 0 when leaving the function because it happens to contain number of read bytes. Thus we always log error message although everything is OK. Since all error cases properly call mlog_errno() before jumping to out_err, there's no reason to call mlog_errno() on exit at all. This is a fallout of c1e8d35e (conversion of mlog_exit() calls).

---
 fs/ocfs2/quota_global.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
fs/ocfs2/quota_global.c +0 -2
index 92fcd57..0a86e30 100644
@@ -399,8 +399,6 @@ int ocfs2_global_read_info(struct super_block *sb, int type)
 			      msecs_to_jiffies(oinfo->dqi_syncms));
 
 out_err:
-	if (status)
-		mlog_errno(status);
 	return status;
 out_unlock:
 	ocfs2_unlock_global_qf(oinfo, 0);
Signature · 1 line
1.7.1
maintainer
#1 lore raw

PATCH 1/1 ocfs2: Fix bogus error message from ocfs2_global_read_info

Quoted 8 lines · Jan Kara

'status' variable in ocfs2_global_read_info() is always != 0 when leaving the function because it happens to contain number of read bytes. Thus we always log error message although everything is OK. Since all error cases properly call mlog_errno() before jumping to out_err, there's no reason to call mlog_errno() on exit at all. This is a fallout of c1e8d35e (conversion of mlog_exit() calls).

This patch is (finally) now part of the 'fixes' branch of ocfs2.git.

Joel

Quoted 20 lines
---
 fs/ocfs2/quota_global.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
fs/ocfs2/quota_global.c +0 -2
index 92fcd57..0a86e30 100644
@@ -399,8 +399,6 @@ int ocfs2_global_read_info(struct super_block *sb, int type)
 			      msecs_to_jiffies(oinfo->dqi_syncms));
 
 out_err:
-	if (status)
-		mlog_errno(status);
 	return status;
 out_unlock:
 	ocfs2_unlock_global_qf(oinfo, 0);
Signature · 1 line
1.7.1
Signature · 6 lines
"Here's something to think about:  How come you never see a headline
 like ``Psychic Wins Lottery''?"
	- Jay Leno

			http://www.jlbec.org/
			jlbec at evilplan.org