From patchwork Wed Oct 8 02:19:08 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qu Wenruo X-Patchwork-Id: 5050921 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 4AD309F295 for ; Wed, 8 Oct 2014 02:18:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6A82120200 for ; Wed, 8 Oct 2014 02:18:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8EAA0201FA for ; Wed, 8 Oct 2014 02:18:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751447AbaJHCSV (ORCPT ); Tue, 7 Oct 2014 22:18:21 -0400 Received: from cn.fujitsu.com ([59.151.112.132]:4896 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1751253AbaJHCSV (ORCPT ); Tue, 7 Oct 2014 22:18:21 -0400 X-IronPort-AV: E=Sophos;i="5.04,674,1406563200"; d="scan'208";a="36933274" Received: from unknown (HELO edo.cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 08 Oct 2014 10:15:16 +0800 Received: from G08CNEXCHPEKD02.g08.fujitsu.local (localhost.localdomain [127.0.0.1]) by edo.cn.fujitsu.com (8.14.3/8.13.1) with ESMTP id s982IJAv011157; Wed, 8 Oct 2014 10:18:19 +0800 Received: from adam-work.lan (10.167.226.33) by G08CNEXCHPEKD02.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server (TLS) id 14.3.181.6; Wed, 8 Oct 2014 10:18:23 +0800 From: Qu Wenruo To: CC: Subject: [PATCH] btrfs: Fix compile error when CONFIG_SECURITY is not set. Date: Wed, 8 Oct 2014 10:19:08 +0800 Message-ID: <1412734748-28284-1-git-send-email-quwenruo@cn.fujitsu.com> X-Mailer: git-send-email 2.1.2 MIME-Version: 1.0 X-Originating-IP: [10.167.226.33] Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Fix the following compile error when CONFIG_SECURITY is not set: error: 'struct security_mnt_opts' has no member named 'num_mnt_opts' Signed-off-by: Qu Wenruo --- This is the delta patch of the v2 patch. --- fs/btrfs/super.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 1eb7858..6f64411 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c @@ -1248,6 +1248,7 @@ static int setup_security_options(struct btrfs_fs_info *fs_info, if (ret) return ret; +#ifdef CONFIG_SECURITY if (!fs_info->security_opts.num_mnt_opts) { /* first time security setup, copy sec_opts to fs_info */ memcpy(&fs_info->security_opts, sec_opts, sizeof(*sec_opts)); @@ -1260,6 +1261,7 @@ static int setup_security_options(struct btrfs_fs_info *fs_info, */ security_free_mnt_opts(sec_opts); } +#endif return ret; }