From patchwork Tue Apr 14 12:42:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emanuele Giuseppe Esposito X-Patchwork-Id: 11487463 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0C3ED14B4 for ; Tue, 14 Apr 2020 12:45:49 +0000 (UTC) Received: from userp2120.oracle.com (userp2120.oracle.com [156.151.31.85]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D571920768 for ; Tue, 14 Apr 2020 12:45:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D571920768 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=ocfs2-devel-bounces@oss.oracle.com Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 03EChJ1B151111; Tue, 14 Apr 2020 12:45:23 GMT Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by userp2120.oracle.com with ESMTP id 30b6hpmbcd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 14 Apr 2020 12:45:22 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 03ECgwDH133648; Tue, 14 Apr 2020 12:45:22 GMT Received: from oss.oracle.com (oss-old-reserved.oracle.com [137.254.22.2]) by userp3020.oracle.com with ESMTP id 30bqm1pssn-1 (version=TLSv1 cipher=AES256-SHA bits=256 verify=NO); Tue, 14 Apr 2020 12:45:22 +0000 Received: from localhost ([127.0.0.1] helo=lb-oss.oracle.com) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1jOKwL-0003aq-7I; Tue, 14 Apr 2020 05:45:21 -0700 Received: from userp3020.oracle.com ([156.151.31.79]) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1jOKuu-0003RP-Ja for ocfs2-devel@oss.oracle.com; Tue, 14 Apr 2020 05:43:52 -0700 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 03ECgxxe133778 for ; Tue, 14 Apr 2020 12:43:52 GMT Received: from userp2030.oracle.com (userp2030.oracle.com [156.151.31.89]) by userp3020.oracle.com with ESMTP id 30bqm1pmaq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 14 Apr 2020 12:43:52 +0000 Received: from pps.filterd (userp2030.oracle.com [127.0.0.1]) by userp2030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 03ECcu53021029 for ; Tue, 14 Apr 2020 12:43:51 GMT Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by userp2030.oracle.com with ESMTP id 30d6wj628p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=OK) for ; Tue, 14 Apr 2020 12:43:51 +0000 Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-496-Qww9zxNINGuVTie3GLGMag-1; Tue, 14 Apr 2020 08:43:47 -0400 X-MC-Unique: Qww9zxNINGuVTie3GLGMag-1 Received: by mail-wr1-f72.google.com with SMTP id m15so8673132wrb.0 for ; Tue, 14 Apr 2020 05:43:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=mpH0i9D4CKdkaA94rTuJ9ZLibjvc0u/wsmELw+W2YRE=; b=SHBG/n3Sv8IWlH+l5CnDKKotiHVD/eUU9ELTWyO2ZB44NfDM0ttbE4+JoYIbcCglvA BxRHN0KdxAH95gIy92/RkaG0kPMW4splW6atLmFUB+kcBPKjI0MtqUjCxBHA1wn+Lnc1 AUqOCdKH17TJXnkcqM1TO6e7Ecp1tYEiGHBEAxli9RRcCdzMRbQKy5wPDIVyl8N3u67C 0ucNwrNNpdVkG1Dz6ZK7pl1VMS/VdVp3A4O+CfuF2sKmvf/GgWOVZcfR2QzszVdB2rw2 Y6qy65+E2BiKBZrpula8bIMgrO+GV1J9uTZ7xIeWHPe7CFI2Q0oe4OCuGTlPlmoVN4jl hwGw== X-Gm-Message-State: AGi0PuasZdUwHgO5yuEM+DiY6JhGsHJgoP1s7ZXOtsjumW+1+KtkTnsd DIjOV5cOsSFsbIa+iYuPiu0AT3Eb6trkZn/v5/ZkiiiGi5p88p6F6jrk3rH9kl1AI++zizNvlcJ 88kcqpGpQl7MQ5fMaxVN1cg== X-Received: by 2002:adf:b1c6:: with SMTP id r6mr22955728wra.49.1586868225599; Tue, 14 Apr 2020 05:43:45 -0700 (PDT) X-Google-Smtp-Source: APiQypKrr6l40rwg6gvnqEERTdItJB1re/eEs/hrCesLG4TYaZ1yTmp5eu/qtdPBP1+X7lPvfKXptw== X-Received: by 2002:adf:b1c6:: with SMTP id r6mr22955631wra.49.1586868225144; Tue, 14 Apr 2020 05:43:45 -0700 (PDT) Received: from localhost.localdomain ([194.230.155.210]) by smtp.gmail.com with ESMTPSA id m14sm16948816wrs.76.2020.04.14.05.43.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Apr 2020 05:43:44 -0700 (PDT) From: Emanuele Giuseppe Esposito To: linux-nfs@vger.kernel.org Date: Tue, 14 Apr 2020 14:42:56 +0200 Message-Id: <20200414124304.4470-3-eesposit@redhat.com> X-Mailer: git-send-email 2.25.2 In-Reply-To: <20200414124304.4470-1-eesposit@redhat.com> References: <20200414124304.4470-1-eesposit@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Proofpoint-SPF-Result: pass X-Proofpoint-SPF-Record: v=spf1 ip4:103.23.64.2 ip4:103.23.65.2 ip4:103.23.66.26 ip4:103.23.67.26 ip4:107.21.15.141 ip4:108.177.8.0/21 ip4:13.111.0.0/16 ip4:136.147.128.0/20 ip4:136.147.176.0/20 ip4:148.105.8.0/21 ip4:149.72.0.0/16 ip4:149.96.1.26 ip4:149.96.13.2 ip4:149.96.132.2 ip4:149.96.133.2 ip4:149.96.14.2 ip4:149.96.194.2 ip4:149.96.195.2 ip4:149.96.2.26 include:spf1.redhat.com -all X-Proofpoint-SPF-VenPass: Allowed X-PDR: PASS X-Source-IP: 205.139.110.120 X-ServerName: us-smtp-delivery-1.mimecast.com X-Proofpoint-SPF-Result: pass X-Proofpoint-SPF-Record: v=spf1 ip4:103.23.64.2 ip4:103.23.65.2 ip4:103.23.66.26 ip4:103.23.67.26 ip4:107.21.15.141 ip4:108.177.8.0/21 ip4:13.111.0.0/16 ip4:136.147.128.0/20 ip4:136.147.176.0/20 ip4:148.105.8.0/21 ip4:149.72.0.0/16 ip4:149.96.1.26 ip4:149.96.13.2 ip4:149.96.132.2 ip4:149.96.133.2 ip4:149.96.14.2 ip4:149.96.194.2 ip4:149.96.195.2 ip4:149.96.2.26 include:spf1.redhat.com -all X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9590 signatures=668686 X-Proofpoint-Spam-Details: rule=tap_spam_policies_safe policy=tap_spam_policies score=0 classifier= adjust=0 reason=safe scancount=1 engine=8.12.0-2003020000 definitions=main-2004140105 X-Spam: OrgSafeList X-SpamRule: orgsafelist X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 mlxlogscore=999 adultscore=0 mlxscore=0 phishscore=0 malwarescore=0 spamscore=0 suspectscore=1 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2004140105 X-Mailman-Approved-At: Tue, 14 Apr 2020 05:45:19 -0700 Cc: Song Liu , linux-usb@vger.kernel.org, bpf@vger.kernel.org, "Rafael J. Wysocki" , David Airlie , Benjamin Herrenschmidt , Heiko Carstens , Alexei Starovoitov , dri-devel@lists.freedesktop.org, "J. Bruce Fields" , Hugh Dickins , Paul Mackerras , John Johansen , linux-s390@vger.kernel.org, Andrew Donnellan , Emanuele Giuseppe Esposito , Matthew Garrett , linux-efi@vger.kernel.org, Arnd Bergmann , Daniel Borkmann , Christian Borntraeger , linux-rdma@vger.kernel.org, Michael Ellerman , Anton Vorontsov , John Fastabend , James Morris , Ard Biesheuvel , Jason Gunthorpe , Doug Ledford , oprofile-list@lists.sf.net, Yonghong Song , Ian Kent , Andrii Nakryiko , Alexey Dobriyan , "Serge E. Hallyn" , netdev@vger.kernel.org, Robert Richter , Thomas Zimmermann , Vasily Gorbik , Tony Luck , Kees Cook , "James E.J. Bottomley" , autofs@vger.kernel.org, Maarten Lankhorst , Uma Krishnan , Maxime Ripard , linux-fsdevel@vger.kernel.org, "Manoj N. Kumar" , Alexander Viro , Jakub Kicinski , KP Singh , Trond Myklebust , "Matthew R. Ochs" , "David S. Miller" , Felipe Balbi , Mike Marciniszyn , Iurii Zaikin , linux-scsi@vger.kernel.org, linux-mm@kvack.org, Greg Kroah-Hartman , Dennis Dalessandro , Miklos Szeredi , linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, Anna Schumaker , Luis Chamberlain , Chuck Lever , Jeremy Kerr , Daniel Vetter , Colin Cross , Frederic Barrat , Paolo Bonzini , Mike Kravetz , linuxppc-dev@lists.ozlabs.org, Martin KaFai Lau , ocfs2-devel@oss.oracle.com Subject: [Ocfs2-devel] [PATCH 2/8] fs: extract simple_pin/release_fs to separate files X-BeenThere: ocfs2-devel@oss.oracle.com X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: ocfs2-devel-bounces@oss.oracle.com Errors-To: ocfs2-devel-bounces@oss.oracle.com X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9590 signatures=668686 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 mlxlogscore=999 adultscore=0 mlxscore=0 phishscore=0 malwarescore=0 spamscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2004140105 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9590 signatures=668686 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 adultscore=0 mlxlogscore=999 clxscore=1011 mlxscore=0 phishscore=0 suspectscore=0 lowpriorityscore=0 bulkscore=0 malwarescore=0 priorityscore=1501 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2004140105 We will augment this family of functions with inode management. To avoid littering include/linux/fs.h and fs/libfs.c, move them to a separate header, with a Kconfig symbol to enable them. Signed-off-by: Emanuele Giuseppe Esposito --- drivers/gpu/drm/Kconfig | 1 + drivers/gpu/drm/drm_drv.c | 2 +- drivers/misc/cxl/Kconfig | 1 + drivers/misc/cxl/api.c | 1 + drivers/misc/ocxl/Kconfig | 1 + drivers/scsi/cxlflash/ocxl_hw.c | 1 + fs/Kconfig | 3 +++ fs/Kconfig.binfmt | 1 + fs/Makefile | 1 + fs/binfmt_misc.c | 2 +- fs/configfs/Kconfig | 1 + fs/configfs/mount.c | 2 +- fs/debugfs/inode.c | 2 +- fs/libfs.c | 36 +------------------------------ fs/simplefs.c | 38 +++++++++++++++++++++++++++++++++ fs/tracefs/inode.c | 2 +- include/linux/fs.h | 2 -- include/linux/simplefs.h | 10 +++++++++ lib/Kconfig.debug | 16 ++++++++------ security/Kconfig | 1 + security/apparmor/apparmorfs.c | 3 ++- security/inode.c | 2 +- 22 files changed, 79 insertions(+), 50 deletions(-) create mode 100644 fs/simplefs.c create mode 100644 include/linux/simplefs.h diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig index 43594978958e..a6fe933de9da 100644 --- a/drivers/gpu/drm/Kconfig +++ b/drivers/gpu/drm/Kconfig @@ -14,6 +14,7 @@ menuconfig DRM select I2C select I2C_ALGOBIT select DMA_SHARED_BUFFER + select SIMPLEFS select SYNC_FILE help Kernel-level support for the Direct Rendering Infrastructure (DRI) diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c index 7b1a628d1f6e..187a61091b5c 100644 --- a/drivers/gpu/drm/drm_drv.c +++ b/drivers/gpu/drm/drm_drv.c @@ -27,7 +27,7 @@ */ #include -#include +#include #include #include #include diff --git a/drivers/misc/cxl/Kconfig b/drivers/misc/cxl/Kconfig index 39eec9031487..a62795079d9c 100644 --- a/drivers/misc/cxl/Kconfig +++ b/drivers/misc/cxl/Kconfig @@ -19,6 +19,7 @@ config CXL select CXL_BASE select CXL_AFU_DRIVER_OPS select CXL_LIB + select SIMPLEFS default m help Select this option to enable driver support for IBM Coherent diff --git a/drivers/misc/cxl/api.c b/drivers/misc/cxl/api.c index b493de962153..0b8f8de7475a 100644 --- a/drivers/misc/cxl/api.c +++ b/drivers/misc/cxl/api.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/misc/ocxl/Kconfig b/drivers/misc/ocxl/Kconfig index 2d2266c1439e..ddd9245fff3d 100644 --- a/drivers/misc/ocxl/Kconfig +++ b/drivers/misc/ocxl/Kconfig @@ -12,6 +12,7 @@ config OCXL depends on PPC_POWERNV && PCI && EEH select OCXL_BASE select HOTPLUG_PCI_POWERNV + select SIMPLEFS default m help Select this option to enable the ocxl driver for Open diff --git a/drivers/scsi/cxlflash/ocxl_hw.c b/drivers/scsi/cxlflash/ocxl_hw.c index 7018cd802569..429f55651090 100644 --- a/drivers/scsi/cxlflash/ocxl_hw.c +++ b/drivers/scsi/cxlflash/ocxl_hw.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include diff --git a/fs/Kconfig b/fs/Kconfig index f08fbbfafd9a..a6795ae312a2 100644 --- a/fs/Kconfig +++ b/fs/Kconfig @@ -218,6 +218,9 @@ config HUGETLB_PAGE config MEMFD_CREATE def_bool TMPFS || HUGETLBFS +config SIMPLEFS + bool + config ARCH_HAS_GIGANTIC_PAGE bool diff --git a/fs/Kconfig.binfmt b/fs/Kconfig.binfmt index 62dc4f577ba1..af7b765de4d3 100644 --- a/fs/Kconfig.binfmt +++ b/fs/Kconfig.binfmt @@ -176,6 +176,7 @@ config BINFMT_EM86 config BINFMT_MISC tristate "Kernel support for MISC binaries" + select SIMPLEFS ---help--- If you say Y here, it will be possible to plug wrapper-driven binary formats into the kernel. You will like this especially when you use diff --git a/fs/Makefile b/fs/Makefile index 2ce5112b02c8..c5c665984b9e 100644 --- a/fs/Makefile +++ b/fs/Makefile @@ -26,6 +26,7 @@ obj-$(CONFIG_PROC_FS) += proc_namespace.o obj-y += notify/ obj-$(CONFIG_EPOLL) += eventpoll.o obj-y += anon_inodes.o +obj-$(CONFIG_SIMPLEFS) += simplefs.o obj-$(CONFIG_SIGNALFD) += signalfd.o obj-$(CONFIG_TIMERFD) += timerfd.o obj-$(CONFIG_EVENTFD) += eventfd.o diff --git a/fs/binfmt_misc.c b/fs/binfmt_misc.c index cdb45829354d..c764110f5f0b 100644 --- a/fs/binfmt_misc.c +++ b/fs/binfmt_misc.c @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include #include "internal.h" diff --git a/fs/configfs/Kconfig b/fs/configfs/Kconfig index 272b64456999..3b461e4e3989 100644 --- a/fs/configfs/Kconfig +++ b/fs/configfs/Kconfig @@ -1,6 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-only config CONFIGFS_FS tristate "Userspace-driven configuration filesystem" + select SIMPLEFS select SYSFS help configfs is a RAM-based filesystem that provides the converse diff --git a/fs/configfs/mount.c b/fs/configfs/mount.c index 0c6e8cf61953..331c2f064f02 100644 --- a/fs/configfs/mount.c +++ b/fs/configfs/mount.c @@ -10,7 +10,7 @@ * configfs Copyright (C) 2005 Oracle. All rights reserved. */ -#include +#include #include #include #include diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c index b7f2e971ecbc..7b9fddced48f 100644 --- a/fs/debugfs/inode.c +++ b/fs/debugfs/inode.c @@ -13,7 +13,7 @@ #define pr_fmt(fmt) "debugfs: " fmt #include -#include +#include #include #include #include diff --git a/fs/libfs.c b/fs/libfs.c index 3759fbacf522..26ec729f7bcd 100644 --- a/fs/libfs.c +++ b/fs/libfs.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -663,41 +664,6 @@ int simple_fill_super(struct super_block *s, unsigned long magic, } EXPORT_SYMBOL(simple_fill_super); -static DEFINE_SPINLOCK(pin_fs_lock); - -int simple_pin_fs(struct file_system_type *type, struct vfsmount **mount, int *count) -{ - struct vfsmount *mnt = NULL; - spin_lock(&pin_fs_lock); - if (unlikely(!*mount)) { - spin_unlock(&pin_fs_lock); - mnt = vfs_kern_mount(type, SB_KERNMOUNT, type->name, NULL); - if (IS_ERR(mnt)) - return PTR_ERR(mnt); - spin_lock(&pin_fs_lock); - if (!*mount) - *mount = mnt; - } - mntget(*mount); - ++*count; - spin_unlock(&pin_fs_lock); - mntput(mnt); - return 0; -} -EXPORT_SYMBOL(simple_pin_fs); - -void simple_release_fs(struct vfsmount **mount, int *count) -{ - struct vfsmount *mnt; - spin_lock(&pin_fs_lock); - mnt = *mount; - if (!--*count) - *mount = NULL; - spin_unlock(&pin_fs_lock); - mntput(mnt); -} -EXPORT_SYMBOL(simple_release_fs); - /** * simple_read_from_buffer - copy data from the buffer to user space * @to: the user space buffer to read to diff --git a/fs/simplefs.c b/fs/simplefs.c new file mode 100644 index 000000000000..226d18963801 --- /dev/null +++ b/fs/simplefs.c @@ -0,0 +1,38 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#include +#include + +static DEFINE_SPINLOCK(pin_fs_lock); + +int simple_pin_fs(struct file_system_type *type, struct vfsmount **mount, int *count) +{ + struct vfsmount *mnt = NULL; + spin_lock(&pin_fs_lock); + if (unlikely(!*mount)) { + spin_unlock(&pin_fs_lock); + mnt = vfs_kern_mount(type, SB_KERNMOUNT, type->name, NULL); + if (IS_ERR(mnt)) + return PTR_ERR(mnt); + spin_lock(&pin_fs_lock); + if (!*mount) + *mount = mnt; + } + mntget(*mount); + ++*count; + spin_unlock(&pin_fs_lock); + mntput(mnt); + return 0; +} +EXPORT_SYMBOL(simple_pin_fs); + +void simple_release_fs(struct vfsmount **mount, int *count) +{ + struct vfsmount *mnt; + spin_lock(&pin_fs_lock); + mnt = *mount; + if (!--*count) + *mount = NULL; + spin_unlock(&pin_fs_lock); + mntput(mnt); +} +EXPORT_SYMBOL(simple_release_fs); diff --git a/fs/tracefs/inode.c b/fs/tracefs/inode.c index 0ee8c6dfb036..4353ca81e1d7 100644 --- a/fs/tracefs/inode.c +++ b/fs/tracefs/inode.c @@ -10,7 +10,7 @@ */ #include -#include +#include #include #include #include diff --git a/include/linux/fs.h b/include/linux/fs.h index 4f6f59b4f22a..55b679b89c8a 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -3363,8 +3363,6 @@ struct tree_descr { const char *name; const struct file_operations *ops; int mod struct dentry *d_alloc_name(struct dentry *, const char *); extern int simple_fill_super(struct super_block *, unsigned long, const struct tree_descr *); -extern int simple_pin_fs(struct file_system_type *, struct vfsmount **mount, int *count); -extern void simple_release_fs(struct vfsmount **mount, int *count); extern ssize_t simple_read_from_buffer(void __user *to, size_t count, loff_t *ppos, const void *from, size_t available); diff --git a/include/linux/simplefs.h b/include/linux/simplefs.h new file mode 100644 index 000000000000..1076a44db308 --- /dev/null +++ b/include/linux/simplefs.h @@ -0,0 +1,10 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _LINUX_SIMPLEFS_H +#define _LINUX_SIMPLEFS_H + +#include + +extern int simple_pin_fs(struct file_system_type *, struct vfsmount **mount, int *count); +extern void simple_release_fs(struct vfsmount **mount, int *count); + +#endif diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index d1398cef3b18..fc38a6f0fc11 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -288,12 +288,16 @@ config STRIP_ASM_SYMS config READABLE_ASM bool "Generate readable assembler code" - depends on DEBUG_KERNEL - help - Disable some compiler optimizations that tend to generate human unreadable - assembler output. This may make the kernel slightly slower, but it helps - to keep kernel developers who have to stare a lot at assembler listings - sane. + depends on DEBUG_KERNEL + help + Disable some compiler optimizations that tend to generate human unreadable + assembler output. This may make the kernel slightly slower, but it helps + to keep kernel developers who have to stare a lot at assembler listings + sane. + +config DEBUG_FS + bool "Debug Filesystem" + select SIMPLEFS config HEADERS_INSTALL bool "Install uapi headers to usr/include" diff --git a/security/Kconfig b/security/Kconfig index cd3cc7da3a55..2c6713aa8b4f 100644 --- a/security/Kconfig +++ b/security/Kconfig @@ -39,6 +39,7 @@ config SECURITY_WRITABLE_HOOKS config SECURITYFS bool "Enable the securityfs filesystem" + select SIMPLEFS help This will build the securityfs filesystem. It is currently used by various security modules (AppArmor, IMA, SafeSetID, TOMOYO, TPM). diff --git a/security/apparmor/apparmorfs.c b/security/apparmor/apparmorfs.c index 828bb1eb77ea..d62d3fca47f2 100644 --- a/security/apparmor/apparmorfs.c +++ b/security/apparmor/apparmorfs.c @@ -18,7 +18,7 @@ #include #include #include -#include +#include #include #include #include @@ -2529,6 +2529,7 @@ static int aa_mk_null_file(struct dentry *parent) struct vfsmount *mount; struct dentry *dentry; struct inode *inode; + int error; mount = vfs_kern_mount(type, SB_KERNMOUNT, type->name, NULL); if (IS_ERR(mount)) diff --git a/security/inode.c b/security/inode.c index 6c326939750d..a9a9ee4de21d 100644 --- a/security/inode.c +++ b/security/inode.c @@ -12,7 +12,7 @@ /* #define DEBUG */ #include #include -#include +#include #include #include #include