From patchwork Fri Mar 23 19:23:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Biggers X-Patchwork-Id: 10305487 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 D93C3600CC for ; Fri, 23 Mar 2018 19:31:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C988F2912B for ; Fri, 23 Mar 2018 19:31:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BE6FD2912D; Fri, 23 Mar 2018 19:31:23 +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 544A12912B for ; Fri, 23 Mar 2018 19:31:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752567AbeCWTbV (ORCPT ); Fri, 23 Mar 2018 15:31:21 -0400 Received: from mail-pg0-f67.google.com ([74.125.83.67]:44171 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752536AbeCWTbR (ORCPT ); Fri, 23 Mar 2018 15:31:17 -0400 Received: by mail-pg0-f67.google.com with SMTP id v26so2436354pge.11; Fri, 23 Mar 2018 12:31:17 -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=BY9DJPH2NsbJiHf4i2wvXwTKbDPP2nvvkfQ4RpGdhO0=; b=A4cHZjJO9clJk7HzzvUd5XWRDQmvC2i//kDqRpQFdZDRd58CpStkTA0E+jeFuy3n8t p/nzbS+GVRUV+QsSXCPqy50MTjB6uMTOBytFGxOfXk/6xD3M+HljeqRH/g5RhFAA7qAZ Pq7Mje9EAZS8YxofYWNwQUUy8+8IOZBHLv+41h9Bd+UDFT8nLP4mvPpI1ZcbMAhDH7HU KHY/5bHDix+nPIgWLkJXGaF+Q5gg/2I3M+YzvGgbdrfFIT2wY92nlCWZn8fBRYxvnNXQ zyZwzjG1HRpd6bC8yBZN64eIrhEe4EEvZ3qByD3a+e903cwBqfuMPU1KYyeAjshd4zmG Xcgg== 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=BY9DJPH2NsbJiHf4i2wvXwTKbDPP2nvvkfQ4RpGdhO0=; b=GtHv9HoK5uNKGtQa8BP1YDW25pcRDLQTVnWNB+QjFwAp8hHZDSNEBlKHCy3NJPg54v 1XbqQP/fiqpZNC7auMFnsa5LD2gBmLMCcaADOHLwcJRpIBRyLZ+RoWa9qECeO+v4aIcp yg5fEuabpdtJjPOG/YEm35AuV0PFl7QVuPeEps7RBhWvpTvA9K9PT59ZEB0vaQqHbQUd NE7jlHD56kMRh8SuPXoWaHQl9fSkzrGSw7ayrj8aPHNV/3tg66yqCqq3HGTs9rrMFclv p3qcJgZJ7TvtLHofFDk73PQ63+9/iuc6GMjQSiicjDcu9JA4nATU3r0F+sVWySeqQejh 8t3Q== X-Gm-Message-State: AElRT7GF7m3L4/X6XYFzhYPvBzhCQwUImJND/xUFmmfqOCnn7SLdpJn7 qslRxzC54POGNS4Vr40mHH/JKVMM X-Google-Smtp-Source: AG47ELtDnwgAJKVMkd9ki5zga4PiftxJX5gpFxtMgHpJ0eJ38LRHptUc+52QEAN8m2SwVOVI41TAJw== X-Received: by 10.99.114.86 with SMTP id c22mr21525182pgn.72.1521833477149; Fri, 23 Mar 2018 12:31:17 -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 x1sm20924545pfk.144.2018.03.23.12.31.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Mar 2018 12:31:16 -0700 (PDT) From: Eric Biggers To: linux-fscrypt@vger.kernel.org, "Theodore Y . Ts'o" Cc: linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-mtd@lists.infradead.org, Jaegeuk Kim , 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> X-Mailer: git-send-email 2.17.0.rc0.231.g781580f067-goog In-Reply-To: <20180323192358.95691-1-ebiggers3@gmail.com> References: <20180323192358.95691-1-ebiggers3@gmail.com> 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 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) {