{"id":816556,"url":"http://patchwork.ozlabs.org/api/patches/816556/?format=json","web_url":"http://patchwork.ozlabs.org/project/linux-ext4/patch/20170920224605.22030-22-ebiggers3@gmail.com/","project":{"id":8,"url":"http://patchwork.ozlabs.org/api/projects/8/?format=json","name":"Linux ext4 filesystem development","link_name":"linux-ext4","list_id":"linux-ext4.vger.kernel.org","list_email":"linux-ext4@vger.kernel.org","web_url":null,"scm_url":null,"webscm_url":null,"list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20170920224605.22030-22-ebiggers3@gmail.com>","list_archive_url":null,"date":"2017-09-20T22:46:01","name":"[21/25] ubifs: switch to fscrypt_file_open()","commit_ref":null,"pull_url":null,"state":"not-applicable","archived":true,"hash":"e30841c91829d95e50bca3440ef40aeeb5518319","submitter":{"id":65202,"url":"http://patchwork.ozlabs.org/api/people/65202/?format=json","name":"Eric Biggers","email":"ebiggers3@gmail.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/linux-ext4/patch/20170920224605.22030-22-ebiggers3@gmail.com/mbox/","series":[{"id":4249,"url":"http://patchwork.ozlabs.org/api/series/4249/?format=json","web_url":"http://patchwork.ozlabs.org/project/linux-ext4/list/?series=4249","date":"2017-09-20T22:45:40","name":"fscrypt: add some higher-level helper functions","version":1,"mbox":"http://patchwork.ozlabs.org/series/4249/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/816556/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/816556/checks/","tags":{},"related":[],"headers":{"Return-Path":"<linux-ext4-owner@vger.kernel.org>","X-Original-To":"patchwork-incoming@ozlabs.org","Delivered-To":"patchwork-incoming@ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=linux-ext4-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"hUp0UcHJ\"; dkim-atps=neutral"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xyFJb0fVJz9sPk\n\tfor <patchwork-incoming@ozlabs.org>;\n\tThu, 21 Sep 2017 08:48:15 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1752106AbdITWro (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tWed, 20 Sep 2017 18:47:44 -0400","from mail-pf0-f193.google.com ([209.85.192.193]:34765 \"EHLO\n\tmail-pf0-f193.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1752002AbdITWrO (ORCPT\n\t<rfc822; linux-ext4@vger.kernel.org>); Wed, 20 Sep 2017 18:47:14 -0400","by mail-pf0-f193.google.com with SMTP id g65so1725901pfe.1;\n\tWed, 20 Sep 2017 15:47:14 -0700 (PDT)","from ebiggers-linuxstation.kir.corp.google.com ([100.66.174.81])\n\tby smtp.gmail.com with ESMTPSA id j2sm6249pgn.26.2017.09.20.15.47.13\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tWed, 20 Sep 2017 15:47:13 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=gmail.com; s=20161025;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=7lGsaxjTPRiIaKGalO2p30WgH1XiARWF/SPy1lY9VQs=;\n\tb=hUp0UcHJG2/gzufdG1NQER6z3EXrl5mfazleAG6KQhou1MVO4Tn9fbCIy240lKeOKl\n\th2C4lBI++mvwNtHXyZT+m2Xi1vZiNpRu/FFjoRXQQT5qcfeQ9MOhcbKXpfEDzEHDJSxl\n\tR0w4N/RM3qORmlXVc156tVHp2ueu6g/tMWuVfws4ykPcx6qKtOCiWehNuNH4jjXlxI5r\n\t+XEeUwZh05kMGLgUNg67/XDNB2HAQdcFN2sk1XuOjGBIpaj+SPtR60kyMhhM+iu+8NFb\n\tHEkWrpgNEHsjrmPhk2nEmVc0X4QnWcYsMBAz50jbtbHqHajrJto3XgpctkCPolXaVG2E\n\t3P5w==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=7lGsaxjTPRiIaKGalO2p30WgH1XiARWF/SPy1lY9VQs=;\n\tb=OB6EUP8NR16V+KqzwLtto/mLXYDTsjRoCFA4AF9QJW3BcJkEhoQZkJ7IaOFGOvZm4A\n\t7HTFLQddQLH82xV5+Y/SWsiwLFCHDl+yQIyW5NDjxR9DklY6sl1UdCkDTbF2rOHPi62P\n\t2X6RW9cGjlrnze4xrHKASdpzaUDtqLt8aXcr55O6yr+d8WApjtmsvyS2ti9TVYIJChdk\n\tB5eAjvz91Lej8G23JX6W64BbD7V0G+rMnxlHZb54LAZ0TFqBOBwIds6M0E7i+PIldWRm\n\tOI99MAkuIVcgU2wPx2UA4ru/QXt/EUCpd90Nps36YfWlg6Je8ZInYQeEHu6N0g0s31TU\n\tsnVw==","X-Gm-Message-State":"AHPjjUiGuZxhLOuUExOMV7Ta9sYS0DJZkoDowbRNFacS1WJyb9yfq7fZ\n\tACGL21Z+jKtl8S5zvljsZ7Ahr7ff6X8=","X-Google-Smtp-Source":"AOwi7QBM7dNIUN5G63y25ZilyfGTIrhYGxc7y1+/SRWIsGNCAIXOdasvmb3jI3uM1OJG/yfD1y1TSw==","X-Received":"by 10.84.129.103 with SMTP id 94mr3562803plb.151.1505947633925; \n\tWed, 20 Sep 2017 15:47:13 -0700 (PDT)","From":"Eric Biggers <ebiggers3@gmail.com>","To":"linux-fscrypt@vger.kernel.org","Cc":"linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org,\n\tlinux-f2fs-devel@lists.sourceforge.net,\n\tlinux-mtd@lists.infradead.org, \"Theodore Y . Ts'o\" <tytso@mit.edu>,\n\tJaegeuk Kim <jaegeuk@kernel.org>, Michael Halcrow <mhalcrow@google.com>,\n\tEric Biggers <ebiggers@google.com>","Subject":"[PATCH 21/25] ubifs: switch to fscrypt_file_open()","Date":"Wed, 20 Sep 2017 15:46:01 -0700","Message-Id":"<20170920224605.22030-22-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>","Sender":"linux-ext4-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<linux-ext4.vger.kernel.org>","X-Mailing-List":"linux-ext4@vger.kernel.org"},"content":"From: Eric Biggers <ebiggers@google.com>\n\nSigned-off-by: Eric Biggers <ebiggers@google.com>\n---\n fs/ubifs/file.c | 31 +------------------------------\n 1 file changed, 1 insertion(+), 30 deletions(-)","diff":"diff --git a/fs/ubifs/file.c b/fs/ubifs/file.c\nindex a02aa59d1e24..31dc632a52fc 100644\n--- a/fs/ubifs/file.c\n+++ b/fs/ubifs/file.c\n@@ -1629,35 +1629,6 @@ static int ubifs_file_mmap(struct file *file, struct vm_area_struct *vma)\n \treturn 0;\n }\n \n-static int ubifs_file_open(struct inode *inode, struct file *filp)\n-{\n-\tint ret;\n-\tstruct dentry *dir;\n-\tstruct ubifs_info *c = inode->i_sb->s_fs_info;\n-\n-\tif (ubifs_crypt_is_encrypted(inode)) {\n-\t\tret = fscrypt_get_encryption_info(inode);\n-\t\tif (ret)\n-\t\t\treturn -EACCES;\n-\t\tif (!fscrypt_has_encryption_key(inode))\n-\t\t\treturn -ENOKEY;\n-\t}\n-\n-\tdir = dget_parent(file_dentry(filp));\n-\tif (ubifs_crypt_is_encrypted(d_inode(dir)) &&\n-\t\t\t!fscrypt_has_permitted_context(d_inode(dir), inode)) {\n-\t\tubifs_err(c, \"Inconsistent encryption contexts: %lu/%lu\",\n-\t\t\t  (unsigned long) d_inode(dir)->i_ino,\n-\t\t\t  (unsigned long) inode->i_ino);\n-\t\tdput(dir);\n-\t\tubifs_ro_mode(c, -EPERM);\n-\t\treturn -EPERM;\n-\t}\n-\tdput(dir);\n-\n-\treturn 0;\n-}\n-\n static const char *ubifs_get_link(struct dentry *dentry,\n \t\t\t\t\t    struct inode *inode,\n \t\t\t\t\t    struct delayed_call *done)\n@@ -1746,7 +1717,7 @@ const struct file_operations ubifs_file_operations = {\n \t.unlocked_ioctl = ubifs_ioctl,\n \t.splice_read\t= generic_file_splice_read,\n \t.splice_write\t= iter_file_splice_write,\n-\t.open\t\t= ubifs_file_open,\n+\t.open\t\t= fscrypt_file_open,\n #ifdef CONFIG_COMPAT\n \t.compat_ioctl   = ubifs_compat_ioctl,\n #endif\n","prefixes":["21/25"]}