From patchwork Mon Apr 30 22:51:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Biggers X-Patchwork-Id: 10373025 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 B23246032A for ; Mon, 30 Apr 2018 22:56:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A186A1FF83 for ; Mon, 30 Apr 2018 22:56:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 96152212DA; Mon, 30 Apr 2018 22:56:55 +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=-7.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, MAILING_LIST_MULTI, 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 386B31FF83 for ; Mon, 30 Apr 2018 22:56:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755454AbeD3W4x (ORCPT ); Mon, 30 Apr 2018 18:56:53 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:38711 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755282AbeD3W4q (ORCPT ); Mon, 30 Apr 2018 18:56:46 -0400 Received: by mail-pf0-f196.google.com with SMTP id o76so7873469pfi.5; Mon, 30 Apr 2018 15:56:46 -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=9do0xI/Gk53WyrrKSwNXgYKTTaRYdwmUaK07VYNYN/I=; b=GehkIBX75CLXg68KVwTvCW5qmSql+HtZjWO0tfhQ0TNUMfvwrBSQZnliNNDjRPWZFC p522NmS2HUvHUlXYzRCY/PyibUyEr1ru5QFKlLPFlNTiVP9pgcY8NYzxtxBxMDRXDfGl QsscAJgdC/e+rMf281BnlvbrBn5PD85CF4QiXsFK/eiFLyiCewR7OaScr4HR06Mqkxqs FLN4xw+6+ZSYMVGjwvFPW5igY4zzbW+hDLlKpOCDfY81bkmcALPQXJml1U3nUa6u6uhe rJbyT0KJ6qBDsS2nlzU64lJ78PFV3aFV3Va4u2/9zT2lfVrHWaaIc5AnUaCKkkiNnX78 909g== 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=9do0xI/Gk53WyrrKSwNXgYKTTaRYdwmUaK07VYNYN/I=; b=Bpfp1pH/Pestj8D0NN3v/bHnnQkVFiGCfIwIKvkJk4X0428yUnXfOji+KC3OMvnlob mOLOka3rXUY26Qw3JKBV0VrFxFXnMFjguZOJJLOb37ggbgWnAR1vMNA1aJBLB3U9dDpz xqPRXMUi6pjVvIZi870svbS7E1H0flQGhLaBuSNO8k0MipEqaYBi98c8CGoepriaziqE +GMntXTTIjVfwAAtTyIAe7BfTVBa2Ep1wYCms+PEGRhmtJymPGCbKyZFHfSdFb4C8Mx2 e2BrltHe0gTNH1/9wFo++P47TiMrapgvdOXUmTe6+Elgi2FLDUnHt27BkDJ4lxq6RbEV 1CIw== X-Gm-Message-State: ALQs6tD9m+z1JF5fC31lHfDj4KyHbjSXTVHtpwsc2iaAt7251qaFo0Bi sFPnaEguBf+CV5QnTsvm0vkUZ8+7 X-Google-Smtp-Source: AB8JxZqixYCAts5NqKRurzCg29pF4ItrvoBA5dm+q054FqhOa2auoTm/FwjFX6zWviVRfIIY5to0CA== X-Received: by 2002:a65:62c2:: with SMTP id m2-v6mr11500141pgv.164.1525129005352; Mon, 30 Apr 2018 15:56:45 -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.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 30 Apr 2018 15:56:44 -0700 (PDT) From: Eric Biggers To: linux-fscrypt@vger.kernel.org, "Theodore Y . Ts'o" Cc: Jaegeuk Kim , linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-mtd@lists.infradead.org, Eric Biggers Subject: [PATCH 07/15] fscrypt: don't special-case EOPNOTSUPP from fscrypt_get_encryption_info() Date: Mon, 30 Apr 2018 15:51:41 -0700 Message-Id: <20180430225149.183514-8-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> 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) {