hc
2023-12-06 08f87f769b595151be1afeff53e144f543faa614
kernel/fs/ocfs2/dlm/dlmcommon.h
....@@ -1,25 +1,10 @@
1
+/* SPDX-License-Identifier: GPL-2.0-or-later */
12 /* -*- mode: c; c-basic-offset: 8; -*-
23 * vim: noexpandtab sw=8 ts=8 sts=0:
34 *
45 * dlmcommon.h
56 *
67 * Copyright (C) 2004 Oracle. All rights reserved.
7
- *
8
- * This program is free software; you can redistribute it and/or
9
- * modify it under the terms of the GNU General Public
10
- * License as published by the Free Software Foundation; either
11
- * version 2 of the License, or (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16
- * General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public
19
- * License along with this program; if not, write to the
20
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21
- * Boston, MA 021110-1307, USA.
22
- *
238 */
249
2510 #ifndef DLMCOMMON_H
....@@ -157,7 +142,6 @@
157142 atomic_t res_tot_count;
158143 atomic_t res_cur_count;
159144
160
- struct dlm_debug_ctxt *dlm_debug_ctxt;
161145 struct dentry *dlm_debugfs_subroot;
162146
163147 /* NOTE: Next three are protected by dlm_domain_lock */
....@@ -580,7 +564,7 @@
580564 // 48 bytes
581565 u8 lvb[DLM_LVB_LEN];
582566 // 112 bytes
583
- struct dlm_migratable_lock ml[0]; // 16 bytes each, begins at byte 112
567
+ struct dlm_migratable_lock ml[]; // 16 bytes each, begins at byte 112
584568 };
585569 #define DLM_MIG_LOCKRES_MAX_LEN \
586570 (sizeof(struct dlm_migratable_lockres) + \
....@@ -617,7 +601,7 @@
617601
618602 u8 name[O2NM_MAX_NAME_LEN];
619603
620
- s8 lvb[0];
604
+ s8 lvb[];
621605 };
622606 #define DLM_CONVERT_LOCK_MAX_LEN (sizeof(struct dlm_convert_lock)+DLM_LVB_LEN)
623607
....@@ -632,7 +616,7 @@
632616
633617 u8 name[O2NM_MAX_NAME_LEN];
634618
635
- s8 lvb[0];
619
+ s8 lvb[];
636620 };
637621 #define DLM_UNLOCK_LOCK_MAX_LEN (sizeof(struct dlm_unlock_lock)+DLM_LVB_LEN)
638622
....@@ -648,7 +632,7 @@
648632
649633 u8 name[O2NM_MAX_NAME_LEN];
650634
651
- s8 lvb[0];
635
+ s8 lvb[];
652636 };
653637 #define DLM_PROXY_AST_MAX_LEN (sizeof(struct dlm_proxy_ast)+DLM_LVB_LEN)
654638
....@@ -703,10 +687,6 @@
703687 __be16 pad1;
704688 __be32 pad2;
705689 };
706
-
707
-
708
-#define BITS_PER_BYTE 8
709
-#define BITS_TO_BYTES(bits) (((bits)+BITS_PER_BYTE-1)/BITS_PER_BYTE)
710690
711691 struct dlm_query_join_request
712692 {