Message ID | 20170920224605.22030-20-ebiggers3@gmail.com |
---|---|
State | Not Applicable |
Headers | show
Return-Path: <linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org> 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=65.50.211.133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="FjeiPetM"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="GU+2r4nQ"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.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 3xyFVy5mq4z9sBZ for <incoming@patchwork.ozlabs.org>; Thu, 21 Sep 2017 08:57:14 +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=rd+1AkBt6bVq+jKeZo/v0uIJVaEGNTKYiiQMpmGJ/hM=; b=FjeiPetMQVHtumL1p0fjEMpzHX rZqNO/5qtgrD1GnqNBXGAaO/h2+a33BuumODW58KQBuBON/oLxLS7sR4vaTTw9FgPHrNm67NtlVkb xxyMcSucgpZYNELPFvuw8oG8mWgRddjHQYRhPpk9ebhsVN/ydKk0NU8PglQerV4TmUfH3sFRqaZya Qk3DqXYA6Boe9gos4O+E+pPFYEfKsZtKyyRm4lMNVsHVgxjkO8AQ5MdRNcjhl+pPyQBSNLb1g7HA6 QmzX7WPz/75bNGYwTrCQvHgNFvegYILOz2hADf6ZMaMGz8dkPqREKxZ0SlpsRKMvToaZWPdejTL1l hGdK8M4g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dunvS-0006oT-0i; Wed, 20 Sep 2017 22:57:02 +0000 Received: from mail-pf0-x244.google.com ([2607:f8b0:400e:c00::244]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dunmG-00051V-1o for linux-mtd@lists.infradead.org; Wed, 20 Sep 2017 22:47:42 +0000 Received: by mail-pf0-x244.google.com with SMTP id f84so1721730pfj.3 for <linux-mtd@lists.infradead.org>; Wed, 20 Sep 2017 15:47:12 -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=qGve5j6pvo5UGfbk+kMHIOwcucZR9fhJoMeejt/S+4U=; b=GU+2r4nQR0XirRr0XNoEv0cRyW5ejVvl6ojiOPxLmfTenjZoEt6EkBN1en/iB7PKDQ dWtb71PKpFLeNsttJ6PhMafKyrh9yJKTa07uNlwaHDA943uT+Cx+o50biIeGUVbA7cw8 XEgiZvNaoXYtGDT+NKUyicXTWJ6Q5X6O9yZN9ByVigamGhQkwhIHb/UNPGw4BJE5hpR9 9+Sz1w5SmBmLl9c7uia6Yi5RirAsb9qvGjwQPcSE6H47UN3hrNvfpg4mx23JUdyU/Hb4 S1NiUORBaVM/XVdzqEFST5+LtfHbHhjC6S5kDreX7MiAYU8s6AZ2UHHO+CYEsgmmlJ6K JHfA== 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=qGve5j6pvo5UGfbk+kMHIOwcucZR9fhJoMeejt/S+4U=; b=BkoFZCLUU+ZRddX/5jXv4LjahnXvSk1lxRBsu8ruBQ87+NQUW+ZcwrtSM0/9oSAh/+ JP9Q8Vq0aXVE5OMxAZSdu4D8Rs22BMA6WbCQbMMPU8niu+T2ldrnwMWx3DxHuQwSlr7I QmWE9oHpHchXxowGYkHp6EiKzHp8bBWrj/UQKGk307aocn3hUTIPtlpZg+xel/TzDbdv F0INDGUQxa58cJn5ArAMpjO7X5r5d6e0Fa4XlWd9nVm3rDhfaAnrg6w6AWOAmy94UdFT J6sbNKiU2ShtuSit8tRBI4NYGvt7ydeIFAIU8cvQlCv+ybVc9IJZoU7WIp6dSYgzhsY4 cJ2A== X-Gm-Message-State: AHPjjUjYm2z1Uu5K8nqbS3qJL4HJOVYLxLmDYpFhvtYR+UoFfSJmXgtS kfCjfJdEdiAGCrD7EX4nAAE= X-Google-Smtp-Source: AOwi7QAeAyZdRfDEMpAVENtz4R8PfGOHD3IyzTyQUDyOYOS9eby2JduVpHUYrXNKm0H5KX+q5o+QCw== X-Received: by 10.101.81.1 with SMTP id f1mr3778067pgq.204.1505947631646; Wed, 20 Sep 2017 15:47:11 -0700 (PDT) Received: from ebiggers-linuxstation.kir.corp.google.com ([100.66.174.81]) by smtp.gmail.com with ESMTPSA id j2sm6249pgn.26.2017.09.20.15.47.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 20 Sep 2017 15:47:11 -0700 (PDT) From: Eric Biggers <ebiggers3@gmail.com> To: linux-fscrypt@vger.kernel.org Subject: [PATCH 19/25] f2fs: switch to fscrypt_prepare_lookup() Date: Wed, 20 Sep 2017 15:45:59 -0700 Message-Id: <20170920224605.22030-20-ebiggers3@gmail.com> X-Mailer: git-send-email 2.14.1.821.g8fa685d3b7-goog In-Reply-To: <20170920224605.22030-1-ebiggers3@gmail.com> References: <20170920224605.22030-1-ebiggers3@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170920_154732_599812_2B1C57EE X-CRM114-Status: GOOD ( 12.08 ) X-Spam-Score: -1.8 (-) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-1.8 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [2607:f8b0:400e:c00:0:0:0:244 listed in] [list.dnswl.org] -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.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (ebiggers3[at]gmail.com) -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux MTD discussion mailing list <linux-mtd.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-mtd>, <mailto:linux-mtd-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-mtd/> List-Post: <mailto:linux-mtd@lists.infradead.org> List-Help: <mailto:linux-mtd-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-mtd>, <mailto:linux-mtd-request@lists.infradead.org?subject=subscribe> Cc: "Theodore Y . Ts'o" <tytso@mit.edu>, Eric Biggers <ebiggers@google.com>, Michael Halcrow <mhalcrow@google.com>, linux-f2fs-devel@lists.sourceforge.net, linux-mtd@lists.infradead.org, linux-fsdevel@vger.kernel.org, Jaegeuk Kim <jaegeuk@kernel.org>, linux-ext4@vger.kernel.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-mtd" <linux-mtd-bounces@lists.infradead.org> Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org |
Series |
fscrypt: add some higher-level helper functions
|
expand
|
diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c index 80bcf2185fd8..f4b99f1468d8 100644 --- a/fs/f2fs/namei.c +++ b/fs/f2fs/namei.c @@ -335,20 +335,9 @@ static struct dentry *f2fs_lookup(struct inode *dir, struct dentry *dentry, int err = 0; unsigned int root_ino = F2FS_ROOT_INO(F2FS_I_SB(dir)); - if (f2fs_encrypted_inode(dir)) { - int res = fscrypt_get_encryption_info(dir); - - /* - * DCACHE_ENCRYPTED_WITH_KEY is set if the dentry is - * created while the directory was encrypted and we - * don't have access to the key. - */ - if (fscrypt_has_encryption_key(dir)) - fscrypt_set_encrypted_dentry(dentry); - fscrypt_set_d_op(dentry); - if (res && res != -ENOKEY) - return ERR_PTR(res); - } + err = fscrypt_prepare_lookup(dir, dentry, flags); + if (err) + return ERR_PTR(err); if (dentry->d_name.len > F2FS_NAME_LEN) return ERR_PTR(-ENAMETOOLONG);