ocfs2: Fix empty lvb check

The check for an empty lvb should check the entire buffer not just the first
byte.

Signed-off-by: Kurt Hackel <kurt.hackel@oracle.com>
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
This commit is contained in:
Kurt Hackel
2006-04-27 18:02:10 -07:00
committed by Mark Fasheh
parent aba9aac788
commit 8bc674cb48
2 changed files with 16 additions and 5 deletions

View File

@@ -315,6 +315,15 @@ enum dlm_lockres_list {
DLM_BLOCKED_LIST
};
static inline int dlm_lvb_is_empty(char *lvb)
{
int i;
for (i=0; i<DLM_LVB_LEN; i++)
if (lvb[i])
return 0;
return 1;
}
static inline struct list_head *
dlm_list_idx_to_ptr(struct dlm_lock_resource *res, enum dlm_lockres_list idx)
{