Skip to contentSkip to conversation

ocfs2: Should error return be negative?

PATCH New Roel Kluin 1 participant 1 message Nov 11, 2009 OCFS2

lore
Share & tools
lore

Roel Kluin

author
#0 lore raw

PATCH 1/1 ocfs2: Should error return be negative?

Return a negative error value instead of a positive

---
 fs/ocfs2/dlm/dlmrecovery.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

The return of a positive error is unusual for oracle:

[roel@zoinx linux-git]$ git grep -n -E "return E[[:upper:]]*;" -- fs/ocfs2/ | wc -l 1
[roel@zoinx linux-git]$ git grep -n -E "return -E[[:upper:]]*;" -- fs/ocfs2/ | wc -l 251

is this maybe required?

fs/ocfs2/dlm/dlmrecovery.c +1 -1
index d9fa3d2..0a8a6a4 100644
@@ -2639,7 +2639,7 @@ int dlm_begin_reco_handler(struct o2net_msg *msg, u32 len, void *data,
 		     dlm->name, br->node_idx, br->dead_node,
 		     dlm->reco.dead_node, dlm->reco.new_master);
 		spin_unlock(&dlm->spinlock);
-		return EAGAIN;
+		return -EAGAIN;
 	}
 	spin_unlock(&dlm->spinlock);