From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Biggers Subject: [PATCH 06/14] fscrypt: don't special-case EOPNOTSUPP from fscrypt_get_encryption_info() Date: Fri, 23 Mar 2018 12:23:50 -0700 Message-ID: <20180323192358.95691-7-ebiggers3@gmail.com> References: <20180323192358.95691-1-ebiggers3@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ezSPM-0002u8-16 for linux-f2fs-devel@lists.sourceforge.net; Fri, 23 Mar 2018 19:31:24 +0000 Received: from sfi-lb-mx.v20.lw.sourceforge.com ([172.30.20.201] helo=mail-pg0-f66.google.com) by sfi-mx-4.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.90_1) id 1ezSPK-00GdYH-M5 for linux-f2fs-devel@lists.sourceforge.net; Fri, 23 Mar 2018 19:31:23 +0000 Received: by mail-pg0-f66.google.com with SMTP id y63so1813577pgy.12 for ; Fri, 23 Mar 2018 12:31:22 -0700 (PDT) In-Reply-To: <20180323192358.95691-1-ebiggers3@gmail.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net To: linux-fscrypt@vger.kernel.org, "Theodore Y . Ts'o" Cc: Jaegeuk Kim , linux-ext4@vger.kernel.org, linux-mtd@lists.infradead.org, Eric Biggers , linux-f2fs-devel@lists.sourceforge.net From: Eric Biggers In fscrypt_setup_filename(), remove the unnecessary check for fscrypt_get_encryption_info() returning EOPNOTSUPP. There's no reason to handle this error differently from any other. I think there may have been some confusion because the "notsupp" version of fscrypt_get_encryption_info() returns EOPNOTSUPP -- but that's not applicable from inside fs/crypto/. Signed-off-by: Eric Biggers --- fs/crypto/fname.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/crypto/fname.c b/fs/crypto/fname.c index 3b5164b159cb..8088a606c0aa 100644 --- a/fs/crypto/fname.c +++ b/fs/crypto/fname.c @@ -335,7 +335,7 @@ int fscrypt_setup_filename(struct inode *dir, const struct qstr *iname, return 0; } ret = fscrypt_get_encryption_info(dir); - if (ret && ret != -EOPNOTSUPP) + if (ret) return ret; if (dir->i_crypt_info) { -- 2.17.0.rc0.231.g781580f067-goog ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot