Skip to content

Commit 799c4c1

Browse files
masahir0ygregkh
authored andcommitted
ocfs2: make local header paths relative to C files
[ Upstream commit ca322fb ] Gang He reports the failure of building fs/ocfs2/ as an external module of the kernel installed on the system: $ cd fs/ocfs2 $ make -C /lib/modules/`uname -r`/build M=`pwd` modules If you want to make it work reliably, I'd recommend to remove ccflags-y from the Makefiles, and to make header paths relative to the C files. I think this is the correct usage of the #include "..." directive. Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Masahiro Yamada <[email protected]> Signed-off-by: Gang He <[email protected]> Reported-by: Gang He <[email protected]> Reviewed-by: Gang He <[email protected]> Cc: Mark Fasheh <[email protected]> Cc: Joel Becker <[email protected]> Cc: Junxiao Bi <[email protected]> Cc: Joseph Qi <[email protected]> Cc: Changwei Ge <[email protected]> Cc: Jun Piao <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent 7a97311 commit 799c4c1

File tree

13 files changed

+41
-45
lines changed

13 files changed

+41
-45
lines changed

fs/ocfs2/dlm/Makefile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
# SPDX-License-Identifier: GPL-2.0-only
2-
ccflags-y := -I $(srctree)/$(src)/..
3-
42
obj-$(CONFIG_OCFS2_FS_O2CB) += ocfs2_dlm.o
53

64
ocfs2_dlm-objs := dlmdomain.o dlmdebug.o dlmthread.o dlmrecovery.o \

fs/ocfs2/dlm/dlmast.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@
2323
#include <linux/spinlock.h>
2424

2525

26-
#include "cluster/heartbeat.h"
27-
#include "cluster/nodemanager.h"
28-
#include "cluster/tcp.h"
26+
#include "../cluster/heartbeat.h"
27+
#include "../cluster/nodemanager.h"
28+
#include "../cluster/tcp.h"
2929

3030
#include "dlmapi.h"
3131
#include "dlmcommon.h"
3232

3333
#define MLOG_MASK_PREFIX ML_DLM
34-
#include "cluster/masklog.h"
34+
#include "../cluster/masklog.h"
3535

3636
static void dlm_update_lvb(struct dlm_ctxt *dlm, struct dlm_lock_resource *res,
3737
struct dlm_lock *lock);

fs/ocfs2/dlm/dlmconvert.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,17 @@
2323
#include <linux/spinlock.h>
2424

2525

26-
#include "cluster/heartbeat.h"
27-
#include "cluster/nodemanager.h"
28-
#include "cluster/tcp.h"
26+
#include "../cluster/heartbeat.h"
27+
#include "../cluster/nodemanager.h"
28+
#include "../cluster/tcp.h"
2929

3030
#include "dlmapi.h"
3131
#include "dlmcommon.h"
3232

3333
#include "dlmconvert.h"
3434

3535
#define MLOG_MASK_PREFIX ML_DLM
36-
#include "cluster/masklog.h"
36+
#include "../cluster/masklog.h"
3737

3838
/* NOTE: __dlmconvert_master is the only function in here that
3939
* needs a spinlock held on entry (res->spinlock) and it is the

fs/ocfs2/dlm/dlmdebug.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,17 @@
1717
#include <linux/debugfs.h>
1818
#include <linux/export.h>
1919

20-
#include "cluster/heartbeat.h"
21-
#include "cluster/nodemanager.h"
22-
#include "cluster/tcp.h"
20+
#include "../cluster/heartbeat.h"
21+
#include "../cluster/nodemanager.h"
22+
#include "../cluster/tcp.h"
2323

2424
#include "dlmapi.h"
2525
#include "dlmcommon.h"
2626
#include "dlmdomain.h"
2727
#include "dlmdebug.h"
2828

2929
#define MLOG_MASK_PREFIX ML_DLM
30-
#include "cluster/masklog.h"
30+
#include "../cluster/masklog.h"
3131

3232
static int stringify_lockname(const char *lockname, int locklen, char *buf,
3333
int len);

fs/ocfs2/dlm/dlmdomain.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,17 @@
2020
#include <linux/debugfs.h>
2121
#include <linux/sched/signal.h>
2222

23-
#include "cluster/heartbeat.h"
24-
#include "cluster/nodemanager.h"
25-
#include "cluster/tcp.h"
23+
#include "../cluster/heartbeat.h"
24+
#include "../cluster/nodemanager.h"
25+
#include "../cluster/tcp.h"
2626

2727
#include "dlmapi.h"
2828
#include "dlmcommon.h"
2929
#include "dlmdomain.h"
3030
#include "dlmdebug.h"
3131

3232
#define MLOG_MASK_PREFIX (ML_DLM|ML_DLM_DOMAIN)
33-
#include "cluster/masklog.h"
33+
#include "../cluster/masklog.h"
3434

3535
/*
3636
* ocfs2 node maps are array of long int, which limits to send them freely

fs/ocfs2/dlm/dlmlock.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,17 @@
2525
#include <linux/delay.h>
2626

2727

28-
#include "cluster/heartbeat.h"
29-
#include "cluster/nodemanager.h"
30-
#include "cluster/tcp.h"
28+
#include "../cluster/heartbeat.h"
29+
#include "../cluster/nodemanager.h"
30+
#include "../cluster/tcp.h"
3131

3232
#include "dlmapi.h"
3333
#include "dlmcommon.h"
3434

3535
#include "dlmconvert.h"
3636

3737
#define MLOG_MASK_PREFIX ML_DLM
38-
#include "cluster/masklog.h"
38+
#include "../cluster/masklog.h"
3939

4040
static struct kmem_cache *dlm_lock_cache;
4141

fs/ocfs2/dlm/dlmmaster.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,17 @@
2525
#include <linux/delay.h>
2626

2727

28-
#include "cluster/heartbeat.h"
29-
#include "cluster/nodemanager.h"
30-
#include "cluster/tcp.h"
28+
#include "../cluster/heartbeat.h"
29+
#include "../cluster/nodemanager.h"
30+
#include "../cluster/tcp.h"
3131

3232
#include "dlmapi.h"
3333
#include "dlmcommon.h"
3434
#include "dlmdomain.h"
3535
#include "dlmdebug.h"
3636

3737
#define MLOG_MASK_PREFIX (ML_DLM|ML_DLM_MASTER)
38-
#include "cluster/masklog.h"
38+
#include "../cluster/masklog.h"
3939

4040
static void dlm_mle_node_down(struct dlm_ctxt *dlm,
4141
struct dlm_master_list_entry *mle,

fs/ocfs2/dlm/dlmrecovery.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,16 @@
2626
#include <linux/delay.h>
2727

2828

29-
#include "cluster/heartbeat.h"
30-
#include "cluster/nodemanager.h"
31-
#include "cluster/tcp.h"
29+
#include "../cluster/heartbeat.h"
30+
#include "../cluster/nodemanager.h"
31+
#include "../cluster/tcp.h"
3232

3333
#include "dlmapi.h"
3434
#include "dlmcommon.h"
3535
#include "dlmdomain.h"
3636

3737
#define MLOG_MASK_PREFIX (ML_DLM|ML_DLM_RECOVERY)
38-
#include "cluster/masklog.h"
38+
#include "../cluster/masklog.h"
3939

4040
static void dlm_do_local_recovery_cleanup(struct dlm_ctxt *dlm, u8 dead_node);
4141

fs/ocfs2/dlm/dlmthread.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,16 @@
2525
#include <linux/delay.h>
2626

2727

28-
#include "cluster/heartbeat.h"
29-
#include "cluster/nodemanager.h"
30-
#include "cluster/tcp.h"
28+
#include "../cluster/heartbeat.h"
29+
#include "../cluster/nodemanager.h"
30+
#include "../cluster/tcp.h"
3131

3232
#include "dlmapi.h"
3333
#include "dlmcommon.h"
3434
#include "dlmdomain.h"
3535

3636
#define MLOG_MASK_PREFIX (ML_DLM|ML_DLM_THREAD)
37-
#include "cluster/masklog.h"
37+
#include "../cluster/masklog.h"
3838

3939
static int dlm_thread(void *data);
4040
static void dlm_flush_asts(struct dlm_ctxt *dlm);

fs/ocfs2/dlm/dlmunlock.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@
2323
#include <linux/spinlock.h>
2424
#include <linux/delay.h>
2525

26-
#include "cluster/heartbeat.h"
27-
#include "cluster/nodemanager.h"
28-
#include "cluster/tcp.h"
26+
#include "../cluster/heartbeat.h"
27+
#include "../cluster/nodemanager.h"
28+
#include "../cluster/tcp.h"
2929

3030
#include "dlmapi.h"
3131
#include "dlmcommon.h"
3232

3333
#define MLOG_MASK_PREFIX ML_DLM
34-
#include "cluster/masklog.h"
34+
#include "../cluster/masklog.h"
3535

3636
#define DLM_UNLOCK_FREE_LOCK 0x00000001
3737
#define DLM_UNLOCK_CALL_AST 0x00000002

0 commit comments

Comments
 (0)