aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/dlm/dlmcommon.h
diff options
context:
space:
mode:
authorKurt Hackel <kurt.hackel@oracle.com>2006-04-27 21:02:10 -0400
committerMark Fasheh <mark.fasheh@oracle.com>2006-06-26 17:42:46 -0400
commit8bc674cb4834fb25206b7f7f5e37fe571aa76b34 (patch)
tree9c9ba3801669e66a30bac121846153879a19dfd6 /fs/ocfs2/dlm/dlmcommon.h
parentaba9aac78817d88aa2b223f1aedf1e9815ae97b8 (diff)
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>
Diffstat (limited to 'fs/ocfs2/dlm/dlmcommon.h')
-rw-r--r--fs/ocfs2/dlm/dlmcommon.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/ocfs2/dlm/dlmcommon.h b/fs/ocfs2/dlm/dlmcommon.h
index 4fc1be3a3fa2..bf873919b009 100644
--- a/fs/ocfs2/dlm/dlmcommon.h
+++ b/fs/ocfs2/dlm/dlmcommon.h
@@ -315,6 +315,15 @@ enum dlm_lockres_list {
315 DLM_BLOCKED_LIST 315 DLM_BLOCKED_LIST
316}; 316};
317 317
318static inline int dlm_lvb_is_empty(char *lvb)
319{
320 int i;
321 for (i=0; i<DLM_LVB_LEN; i++)
322 if (lvb[i])
323 return 0;
324 return 1;
325}
326
318static inline struct list_head * 327static inline struct list_head *
319dlm_list_idx_to_ptr(struct dlm_lock_resource *res, enum dlm_lockres_list idx) 328dlm_list_idx_to_ptr(struct dlm_lock_resource *res, enum dlm_lockres_list idx)
320{ 329{