From patchwork Mon Apr 30 22:51:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Biggers X-Patchwork-Id: 906914 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Ljur7NpT"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="maal8/Rb"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40Zg1r026Bz9s27 for ; Tue, 1 May 2018 08:58:24 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=QUl/9yzprDu47kMoplFhh4rzmxOHqY678s4wPOepW6A=; b=Ljur7NpTIuehLIeZALajYUWkZQ JnHLRuDGNmVJRHU1inekeiclma1uLeWCvuFyRcNNHWeN5W1X8Vx75MFb1xrn3J0uQMSyGtEAuNjLV 3IoyGzH4a7VjboJ8zP0yyLpB6jKPqlNUGfJaJcWBgZJbVd2lxkPmnTk0tfW72+OgnH9tKc7TczH0G xSTbQJ4TDxkvzZGNwMXt4YZ2SJDdQQjJ+FVzkiXss3THHAsDzfiIDPsxegs4GNY+eLCT+KpKC/SKW ioQBOgTzTXJ84tQSqEjzZuWohiWTi9oqs9fHYaosO7KxhAiYLRNv01auK9YweYj+3CVNtd1iZkoEu DEBSfWTQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fDHkF-0004PV-Jg; Mon, 30 Apr 2018 22:58:07 +0000 Received: from mail-pg0-x243.google.com ([2607:f8b0:400e:c05::243]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fDHj0-0003mC-KQ for linux-mtd@lists.infradead.org; Mon, 30 Apr 2018 22:56:52 +0000 Received: by mail-pg0-x243.google.com with SMTP id i29-v6so7244643pgn.12 for ; Mon, 30 Apr 2018 15:56:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=GEosfGWQuVg7oJ/HbHUvmG3ZXuBEuIzteCd3eQ1w4/8=; b=maal8/Rb/KB8F7rCOuuFoMR4KK6qlZadXB307vGgUijuA/MbnLDxLpXU7swrzxC5CI 87GPkMDd0wZmyxGxHZDnTzMw/r0/TNY5JWccZXZF0rUG4rWZjpnfSKTpV1nogoLyxbLM J6V3BZpHz3oz9Kh6XbYW9LgfFdDTHqUej6zdgLaCNjmo4+dhaBVnGdAB9xtmPZFCbOdP qmxp7h43Zk/JQjxOJ779WRiZR1sclD0WYpHVwMvK++nVaZFc3stxRGbc6NSdulM9C0PF rm9pTtOPpfqUOBJ8vOMIkF3lBPwJ2LlGPLm3xV0YOTqzLtKzyv5/FS/aabynEW1QNLdF WuuQ== 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; bh=GEosfGWQuVg7oJ/HbHUvmG3ZXuBEuIzteCd3eQ1w4/8=; b=VLkT7b17VompHM5tHPJfLRZBjZgtvps/8AGSI//l72owf/AuqPqrv4IGYx+HFW9vKA B5q2pJn74wzeakwYSJFYBUxZT5rHLN9p8IVZ7P1iaEJ3MHB0PVPBSkSnVVcenH8/MXLb AlGhJ/bpDrT0NJwRagwjTwZpelAWdKaLyI2hJELgT7Lu/4mOm4MqAsfNjIZR2D8TajR0 WHnKGgiOwXwJfG1eylVJTfOZNrnNuqjWcnxhHJ9/nKzrPAaQg5v40L431ed/CUmsQi6q A9hEmPo9m+YPKrZuBAMqV2JJDHK17Km4lDj6Dc/EzdGYJS5d2K163lUwLzSYFK6fTIK/ NEuQ== X-Gm-Message-State: ALQs6tD5jlmaX7wsJFBmXoZ1rOcjvmSbipOCwlYOjq+Yi6BhFi70Mdpt rR8SiyFL+qqJmZgz3mLdF6w= X-Google-Smtp-Source: AB8JxZqTnkKbREjHoKDgeLQXzVqvQRxTgwzt7pyj2lt0BiIuKlhJamu8h9AINbCrj2Wi8/r11QbIuA== X-Received: by 2002:a63:69c3:: with SMTP id e186-v6mr11253248pgc.353.1525128999824; Mon, 30 Apr 2018 15:56:39 -0700 (PDT) Received: from ebiggers-linuxstation.kir.corp.google.com ([2620:15c:17:3:dc28:5c82:b905:e8a8]) by smtp.gmail.com with ESMTPSA id b15sm12969305pfi.111.2018.04.30.15.56.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 30 Apr 2018 15:56:39 -0700 (PDT) From: Eric Biggers To: linux-fscrypt@vger.kernel.org, "Theodore Y . Ts'o" Subject: [PATCH 01/15] fs, fscrypt: only define ->s_cop when FS_ENCRYPTION is enabled Date: Mon, 30 Apr 2018 15:51:35 -0700 Message-Id: <20180430225149.183514-2-ebiggers3@gmail.com> X-Mailer: git-send-email 2.17.0.441.gb46fe60e1d-goog In-Reply-To: <20180430225149.183514-1-ebiggers3@gmail.com> References: <20180430225149.183514-1-ebiggers3@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180430_155650_694699_08EDCEE1 X-CRM114-Status: GOOD ( 11.83 ) X-Spam-Score: 0.1 (/) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (0.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [2607:f8b0:400e:c05:0:0:0:243 listed in] [list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (ebiggers3[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (ebiggers3[at]gmail.com) -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jaegeuk Kim , linux-ext4@vger.kernel.org, linux-mtd@lists.infradead.org, Eric Biggers , linux-f2fs-devel@lists.sourceforge.net MIME-Version: 1.0 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Eric Biggers Now that filesystems only set and use their fscrypt_operations when they are built with encryption support, we can remove ->s_cop from 'struct super_block' when FS_ENCRYPTION is disabled. This saves a few bytes on some kernels and also makes it consistent with ->i_crypt_info. Signed-off-by: Eric Biggers --- include/linux/fs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/fs.h b/include/linux/fs.h index 760d8da1b6c7..8e2460694c3a 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -1364,9 +1364,9 @@ struct super_block { void *s_security; #endif const struct xattr_handler **s_xattr; - +#if IS_ENABLED(CONFIG_FS_ENCRYPTION) const struct fscrypt_operations *s_cop; - +#endif struct hlist_bl_head s_roots; /* alternate root dentries for NFS */ struct list_head s_mounts; /* list of mounts; _not_ for fs use */ struct block_device *s_bdev;