From patchwork Thu Jun 22 19:14:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Biggers X-Patchwork-Id: 9805167 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 920EA600C5 for ; Thu, 22 Jun 2017 19:16:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 81FF2286F4 for ; Thu, 22 Jun 2017 19:16:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 76D63286F6; Thu, 22 Jun 2017 19:16:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 280E6286F4 for ; Thu, 22 Jun 2017 19:16:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753931AbdFVTQL (ORCPT ); Thu, 22 Jun 2017 15:16:11 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:36807 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752714AbdFVTQJ (ORCPT ); Thu, 22 Jun 2017 15:16:09 -0400 Received: by mail-pf0-f195.google.com with SMTP id y7so4288336pfd.3 for ; Thu, 22 Jun 2017 12:16:09 -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; bh=W9oT5FN8FnMCqtzxUKzCBQg5zaNkIDOP6NwHRJZsmeo=; b=OZBWPh2OujEIijollLu0lKeVcEQbfXY9Vyhx/n3+0pNDPQerel41+kO0T/DVVaXztd CBW1v7Wku7ChVBy49i1scs4KG+R1wBePsvFmnRHEuz3aUjZDANnji5VrfhfoAyu5/CZO W9lcFdsbdfF/KkDuxwGPKPrestR0OH0JgeRPcL6Ul1qw938rU+Et8kbMdGarVD85Ki0N AAe4Q5Sl8CXxjbXZ6pVDMU7OhiFdj/R7uRrCZb4HVcNFgO09WixSqxCRXtk810GNYdKr 8zfPNT6EXdjl7GyG32dKZjImcC/wtTH+Ty4j0VhQMdI6lO0d0nmMxzxMRslZy3l4+g+E Dq6w== 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; bh=W9oT5FN8FnMCqtzxUKzCBQg5zaNkIDOP6NwHRJZsmeo=; b=f6V+jI1E9ypbtBw7Af3YbbVK6itl7ta2KHcY14lt+G6JsRLX+rDZjlFZQiGrAIec1h d/SfS1To9cJJWlGzH6myW4vAYjRKuUEpnQXOEw8jMoY+E2la3Hb3NqNHhg31kRM+Bgyk kljR8IhjHyfUHSjmDZ/abHixmBSrFT80AnUMCVo7m1T4mP6k/Pi2hhuXB1aGQa9B4puR vTXIIf7LYqgOwkfdfHp6qEMGCklZ/Et7nSLABBMcpYN2IPFnImRZwhRpnwYqHJIuHvgs nD+ea7owO36dJxFmsdMEqAu71nnDppNfd9nGZ7/vLF/LdrRewWCc5qP0FR3gs58x8Y8B gFGQ== X-Gm-Message-State: AKS2vOwu8l2WZtkAXsf48ekz2i0AYSnMFyzBbeU62XdLN4UIrJ1OFOVn ec2aRZnmM+LNUxcv+M4= X-Received: by 10.84.217.204 with SMTP id d12mr2608809plj.208.1498158968475; Thu, 22 Jun 2017 12:16:08 -0700 (PDT) Received: from ebiggers-linuxstation.kir.corp.google.com ([100.66.174.81]) by smtp.gmail.com with ESMTPSA id g5sm5340595pgc.42.2017.06.22.12.16.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 22 Jun 2017 12:16:08 -0700 (PDT) From: Eric Biggers To: linux-fscrypt@vger.kernel.org Cc: Theodore Ts'o , Jaegeuk Kim , Eric Biggers Subject: [PATCH] fscrypt: make ->dummy_context() return bool Date: Thu, 22 Jun 2017 12:14:40 -0700 Message-Id: <20170622191440.82025-1-ebiggers3@gmail.com> X-Mailer: git-send-email 2.13.1.611.g7e3b11ae1-goog Sender: linux-fscrypt-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fscrypt@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Eric Biggers This makes it consistent with ->is_encrypted(), ->empty_dir(), and fscrypt_dummy_context_enabled(). Signed-off-by: Eric Biggers --- fs/ext4/super.c | 2 +- include/linux/fscrypt_common.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/ext4/super.c b/fs/ext4/super.c index d46766a7c33e..8ca7e0f03596 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -1219,7 +1219,7 @@ static int ext4_set_context(struct inode *inode, const void *ctx, size_t len, return res; } -static int ext4_dummy_context(struct inode *inode) +static bool ext4_dummy_context(struct inode *inode) { return DUMMY_ENCRYPTION_ENABLED(EXT4_SB(inode->i_sb)); } diff --git a/include/linux/fscrypt_common.h b/include/linux/fscrypt_common.h index 4022c61f7e9b..e3e1208e0f54 100644 --- a/include/linux/fscrypt_common.h +++ b/include/linux/fscrypt_common.h @@ -77,7 +77,7 @@ struct fscrypt_operations { const char *key_prefix; int (*get_context)(struct inode *, void *, size_t); int (*set_context)(struct inode *, const void *, size_t, void *); - int (*dummy_context)(struct inode *); + bool (*dummy_context)(struct inode *); bool (*is_encrypted)(struct inode *); bool (*empty_dir)(struct inode *); unsigned (*max_namelen)(struct inode *);