diff options
author | Kurt Hackel <kurt.hackel@oracle.com> | 2006-04-27 18:02:10 -0700 |
---|---|---|
committer | Mark Fasheh <mark.fasheh@oracle.com> | 2006-06-26 14:42:46 -0700 |
commit | 8bc674cb4834fb25206b7f7f5e37fe571aa76b34 (patch) | |
tree | 9c9ba3801669e66a30bac121846153879a19dfd6 /fs/ocfs2/dlm/dlmcommon.h | |
parent | aba9aac78817d88aa2b223f1aedf1e9815ae97b8 (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.h | 9 |
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 { 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) { |