Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3635698imu; Mon, 28 Jan 2019 08:12:05 -0800 (PST) X-Google-Smtp-Source: ALg8bN6rSG0moT6s1eYtpcwscyx0ke2WRl1aw1K9KhvzxIbk4JSIYrJTL+ITFMMi0jwf/BWPvUbf X-Received: by 2002:a17:902:2c03:: with SMTP id m3mr23188402plb.125.1548691925347; Mon, 28 Jan 2019 08:12:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548691925; cv=none; d=google.com; s=arc-20160816; b=HcNmDrLDeu3LlvnQiqRIPC2xOo7qSOlMIBejYUiLYXd9kJkKUhTPCeOZ8cDtVjX21Z wAdfctholbVRRHsOPdtXgnc5qj3+ki/PWBwngDjf6+kpYS7ukhMSz+f8sC7p+XH7Nmdz DlZgkdDX00swVipWUqf5dKTmcQqt/7bPXBLslVGrayFFyR8Lp554vfgj5j5RyN8KzXyU ufYuZEt5o9tF4bMJlF3WNugvfwzOKc5zuNqnszaDPyIZgi3UkrcJ497ZR6QNe6OmxuWd mrDk3k6dadzT/+lfLFXoE47OdPkAyULe+Bx7GtN+gcZ2o0dxHb9q6yjlgbC6Z+tSMKyb QLeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=t6NOUkNgLG0+SaPl/vmZRIYKtnnaSXR+QC+/bkkXQvA=; b=IO9shnfthDXyT45PorBSrRA1I5QjZyUz791OcAUIbctc4FyIqlNoJmjnynC+3UPiXX Cu7J7dn6u5ZLhMcqeuqtcFg3FZ+EMIsrdMwAp3DQ4TfM/aLUvYkjvcg/HCOYTBAmDpfV b6o5XwVzuTL4kZGtXHaabhiYPa6k3j6BvB+ciuOcMNb9n2NguL/HSE4+hel3RMLOQumW BUJRPjreXlb6ewjWcPQqochlQNUO4gggiTlX1t/xtsAWQYXlzK9e1iW71K9Ju6pVosdf ZQVBC4mlybZWLC9S2CuBnyPxMcGD1VoUcnJdhj2rRLQeFezUOHIyrg5e/hOL0rCaHEZs w+2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=JoHKvhZo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y8si33120187plr.92.2019.01.28.08.11.49; Mon, 28 Jan 2019 08:12:05 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=JoHKvhZo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732881AbfA1QKy (ORCPT + 99 others); Mon, 28 Jan 2019 11:10:54 -0500 Received: from mail.kernel.org ([198.145.29.99]:37354 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731666AbfA1QKx (ORCPT ); Mon, 28 Jan 2019 11:10:53 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DFDFC2084A; Mon, 28 Jan 2019 16:10:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548691852; bh=tNKOX75pnekJKf/gmlhYfUmfvUg4FxLKHyeykOYjtaY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JoHKvhZoRxZFRKYWhicHqWYP85m80GK8nLmK0wMe6moIZEr9u9Z9Fm40bKo6EXvAn AeETepY8tMZsSl0QRNIdXvxPAS/sl3L5tX7voQYyB4M9HWPukUULhQg52Hv+PLg6+b T50HaCxb6ufh5k+wzZyY4rrttGeNIrymdzrxXhhc= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Larry Chen , Mark Fasheh , Joel Becker , Junxiao Bi , Joseph Qi , Changwei Ge , Andrew Morton , Linus Torvalds , Sasha Levin Subject: [PATCH AUTOSEL 4.19 237/258] ocfs2: improve ocfs2 Makefile Date: Mon, 28 Jan 2019 10:59:03 -0500 Message-Id: <20190128155924.51521-237-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190128155924.51521-1-sashal@kernel.org> References: <20190128155924.51521-1-sashal@kernel.org> MIME-Version: 1.0 X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Larry Chen [ Upstream commit 9e6aea22802b5684c7e1d69822aeb0844dd01953 ] Included file path was hard-wired in the ocfs2 makefile, which might causes some confusion when compiling ocfs2 as an external module. Say if we compile ocfs2 module as following. cp -r /kernel/tree/fs/ocfs2 /other/dir/ocfs2 cd /other/dir/ocfs2 make -C /path/to/kernel_source M=`pwd` modules Acutally, the compiler wil try to find included file in /kernel/tree/fs/ocfs2, rather than the directory /other/dir/ocfs2. To fix this little bug, we introduce the var $(src) provided by kbuild. $(src) means the absolute path of the running kbuild file. Link: http://lkml.kernel.org/r/20181108085546.15149-1-lchen@suse.com Signed-off-by: Larry Chen Reviewed-by: Andrew Morton Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Joseph Qi Cc: Changwei Ge Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Sasha Levin --- fs/ocfs2/Makefile | 2 +- fs/ocfs2/dlm/Makefile | 2 +- fs/ocfs2/dlmfs/Makefile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/ocfs2/Makefile b/fs/ocfs2/Makefile index 99ee093182cb..cc9b32b9db7c 100644 --- a/fs/ocfs2/Makefile +++ b/fs/ocfs2/Makefile @@ -1,5 +1,5 @@ # SPDX-License-Identifier: GPL-2.0 -ccflags-y := -Ifs/ocfs2 +ccflags-y := -I$(src) obj-$(CONFIG_OCFS2_FS) += \ ocfs2.o \ diff --git a/fs/ocfs2/dlm/Makefile b/fs/ocfs2/dlm/Makefile index bd1aab1f49a4..ef2854422a6e 100644 --- a/fs/ocfs2/dlm/Makefile +++ b/fs/ocfs2/dlm/Makefile @@ -1,4 +1,4 @@ -ccflags-y := -Ifs/ocfs2 +ccflags-y := -I$(src)/.. obj-$(CONFIG_OCFS2_FS_O2CB) += ocfs2_dlm.o diff --git a/fs/ocfs2/dlmfs/Makefile b/fs/ocfs2/dlmfs/Makefile index eed3db8c5b49..33431a0296a3 100644 --- a/fs/ocfs2/dlmfs/Makefile +++ b/fs/ocfs2/dlmfs/Makefile @@ -1,4 +1,4 @@ -ccflags-y := -Ifs/ocfs2 +ccflags-y := -I$(src)/.. obj-$(CONFIG_OCFS2_FS) += ocfs2_dlmfs.o -- 2.19.1