get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/816570/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 816570,
    "url": "http://patchwork.ozlabs.org/api/patches/816570/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-ext4/patch/20170920224605.22030-3-ebiggers3@gmail.com/",
    "project": {
        "id": 8,
        "url": "http://patchwork.ozlabs.org/api/projects/8/?format=api",
        "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-3-ebiggers3@gmail.com>",
    "list_archive_url": null,
    "date": "2017-09-20T22:45:42",
    "name": "[02/25] fscrypt: switch from ->is_encrypted() to IS_ENCRYPTED()",
    "commit_ref": null,
    "pull_url": null,
    "state": "not-applicable",
    "archived": true,
    "hash": "7eac5aa311a7166f544aa67c06e81c4a974ef417",
    "submitter": {
        "id": 65202,
        "url": "http://patchwork.ozlabs.org/api/people/65202/?format=api",
        "name": "Eric Biggers",
        "email": "ebiggers3@gmail.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linux-ext4/patch/20170920224605.22030-3-ebiggers3@gmail.com/mbox/",
    "series": [
        {
            "id": 4249,
            "url": "http://patchwork.ozlabs.org/api/series/4249/?format=api",
            "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/816570/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/816570/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=\"Gl3mCFOp\"; dkim-atps=neutral"
        ],
        "Received": [
            "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xyFLd0m7tz9sBZ\n\tfor <patchwork-incoming@ozlabs.org>;\n\tThu, 21 Sep 2017 08:50:01 +1000 (AEST)",
            "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751897AbdITWq6 (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tWed, 20 Sep 2017 18:46:58 -0400",
            "from mail-pg0-f68.google.com ([74.125.83.68]:35870 \"EHLO\n\tmail-pg0-f68.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1751795AbdITWqy (ORCPT\n\t<rfc822; linux-ext4@vger.kernel.org>); Wed, 20 Sep 2017 18:46:54 -0400",
            "by mail-pg0-f68.google.com with SMTP id d8so2372625pgt.3;\n\tWed, 20 Sep 2017 15:46:53 -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.46.52\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tWed, 20 Sep 2017 15:46:52 -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=X0DJewv8zNfuMxJnJUk58uqAADv+TgJmFmFIcaUZmc0=;\n\tb=Gl3mCFOpb9uX5dQkI3hXFKHuwCT5Z1xnBZTdMsKpBm82ojNTpzMW7SVCnvw7WlQj5a\n\tU1P5swZu9d4ilPOticRCTofOqAr50UCOGQPyNXBTAHEfgrT51Pu5M4HMvG7nfddvmvV4\n\t887NPiRH0cu/2sJW92A70Icwwx39xBIourT5DeVly1qzYt9Izcb+IKu4ITPo6iuTsDT9\n\ty7nB5z2sXbDKYWOqGojBnKnt/ghqFiAWuSX3DBGuNillLks8ofZzSbZvER3miPGn6xbg\n\tIXLXcMHJENxE7t/zsIgLjdwsjEfavcZ4TaNHG1muwYHw/jcpkHn4zZrwgUGAZsVDT1+L\n\txrAQ==",
        "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=X0DJewv8zNfuMxJnJUk58uqAADv+TgJmFmFIcaUZmc0=;\n\tb=PJPG+G4U3jJrTIFHJ2or4J8ezToRt8/A3f+GsSmLU0eQYIxLew5acgJ8+J1gAVse95\n\tqkpCpNaxAEDPz4LPLDjmyVYTTFekWIm9tlkTsvPaIq4CDsIHL11g8VOFjV2KUErZdkPr\n\tGWv4nHRbm8NGbfoyF/r5diF7Opqo9y/P5JvEyViA5ZuF2i/oegQjCcNxgf8KeFfckGsh\n\tUeRsPpbDn6zQW/ap+tPQ8jjAhXONp6mmDmfTUFeAFkEyPsIVZSgHyTQXw2QN/bDZPySJ\n\tGAfQID5efUXdQvIksb24mlhmTcADYwFlxmc+JC2GhT5Z9hq66hQRrxmbmhMNe/AIGBgy\n\tq2iA==",
        "X-Gm-Message-State": "AHPjjUiowaznQntnLQDEINRdVemW9rV2twtlkxfS/FpCtpxZIKuR5jmN\n\tjyddCNXzApnqdHI6wHXGTeCbPYf07J0=",
        "X-Google-Smtp-Source": "AOwi7QDixjM83fpXsFwm0/OrKVD1ndF+PLOi4hkYaUvTORbra0Lmyvr3Uk36Yk0sGCXTQNC7/PQ84A==",
        "X-Received": "by 10.84.194.131 with SMTP id h3mr3541630pld.352.1505947613266; \n\tWed, 20 Sep 2017 15:46:53 -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 02/25] fscrypt: switch from ->is_encrypted() to\n\tIS_ENCRYPTED()",
        "Date": "Wed, 20 Sep 2017 15:45:42 -0700",
        "Message-Id": "<20170920224605.22030-3-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\nIS_ENCRYPTED() now gives the same information as\ni_sb->s_cop->is_encrypted() but is more efficient, since IS_ENCRYPTED()\nis just a simple flag check.  Prepare to remove ->is_encrypted() by\nswitching all callers to IS_ENCRYPTED().\n\nSigned-off-by: Eric Biggers <ebiggers@google.com>\n---\n fs/crypto/crypto.c              | 2 +-\n fs/crypto/fname.c               | 3 +--\n fs/crypto/keyinfo.c             | 2 +-\n fs/crypto/policy.c              | 6 +++---\n include/linux/fscrypt_notsupp.h | 2 +-\n 5 files changed, 7 insertions(+), 8 deletions(-)",
    "diff": "diff --git a/fs/crypto/crypto.c b/fs/crypto/crypto.c\nindex c7835df7e7b8..608f6bbe0f31 100644\n--- a/fs/crypto/crypto.c\n+++ b/fs/crypto/crypto.c\n@@ -340,7 +340,7 @@ static int fscrypt_d_revalidate(struct dentry *dentry, unsigned int flags)\n \t\treturn -ECHILD;\n \n \tdir = dget_parent(dentry);\n-\tif (!d_inode(dir)->i_sb->s_cop->is_encrypted(d_inode(dir))) {\n+\tif (!IS_ENCRYPTED(d_inode(dir))) {\n \t\tdput(dir);\n \t\treturn 0;\n \t}\ndiff --git a/fs/crypto/fname.c b/fs/crypto/fname.c\nindex ad9f814fdead..2878289b3ed2 100644\n--- a/fs/crypto/fname.c\n+++ b/fs/crypto/fname.c\n@@ -382,8 +382,7 @@ int fscrypt_setup_filename(struct inode *dir, const struct qstr *iname,\n \tmemset(fname, 0, sizeof(struct fscrypt_name));\n \tfname->usr_fname = iname;\n \n-\tif (!dir->i_sb->s_cop->is_encrypted(dir) ||\n-\t\t\t\tfscrypt_is_dot_dotdot(iname)) {\n+\tif (!IS_ENCRYPTED(dir) || fscrypt_is_dot_dotdot(iname)) {\n \t\tfname->disk_name.name = (unsigned char *)iname->name;\n \t\tfname->disk_name.len = iname->len;\n \t\treturn 0;\ndiff --git a/fs/crypto/keyinfo.c b/fs/crypto/keyinfo.c\nindex 018c588c7ac3..236a68d4ea72 100644\n--- a/fs/crypto/keyinfo.c\n+++ b/fs/crypto/keyinfo.c\n@@ -268,7 +268,7 @@ int fscrypt_get_encryption_info(struct inode *inode)\n \tres = inode->i_sb->s_cop->get_context(inode, &ctx, sizeof(ctx));\n \tif (res < 0) {\n \t\tif (!fscrypt_dummy_context_enabled(inode) ||\n-\t\t    inode->i_sb->s_cop->is_encrypted(inode))\n+\t\t    IS_ENCRYPTED(inode))\n \t\t\treturn res;\n \t\t/* Fake up a context for an unencrypted directory */\n \t\tmemset(&ctx, 0, sizeof(ctx));\ndiff --git a/fs/crypto/policy.c b/fs/crypto/policy.c\nindex ce07a86200f3..6a63b8a0d46c 100644\n--- a/fs/crypto/policy.c\n+++ b/fs/crypto/policy.c\n@@ -109,7 +109,7 @@ int fscrypt_ioctl_get_policy(struct file *filp, void __user *arg)\n \tstruct fscrypt_policy policy;\n \tint res;\n \n-\tif (!inode->i_sb->s_cop->is_encrypted(inode))\n+\tif (!IS_ENCRYPTED(inode))\n \t\treturn -ENODATA;\n \n \tres = inode->i_sb->s_cop->get_context(inode, &ctx, sizeof(ctx));\n@@ -166,11 +166,11 @@ int fscrypt_has_permitted_context(struct inode *parent, struct inode *child)\n \t\treturn 1;\n \n \t/* No restrictions if the parent directory is unencrypted */\n-\tif (!cops->is_encrypted(parent))\n+\tif (!IS_ENCRYPTED(parent))\n \t\treturn 1;\n \n \t/* Encrypted directories must not contain unencrypted files */\n-\tif (!cops->is_encrypted(child))\n+\tif (!IS_ENCRYPTED(child))\n \t\treturn 0;\n \n \t/*\ndiff --git a/include/linux/fscrypt_notsupp.h b/include/linux/fscrypt_notsupp.h\nindex ec406aed2f2f..3f1325ec4646 100644\n--- a/include/linux/fscrypt_notsupp.h\n+++ b/include/linux/fscrypt_notsupp.h\n@@ -97,7 +97,7 @@ static inline int fscrypt_setup_filename(struct inode *dir,\n \t\t\t\t\t const struct qstr *iname,\n \t\t\t\t\t int lookup, struct fscrypt_name *fname)\n {\n-\tif (dir->i_sb->s_cop->is_encrypted(dir))\n+\tif (IS_ENCRYPTED(dir))\n \t\treturn -EOPNOTSUPP;\n \n \tmemset(fname, 0, sizeof(struct fscrypt_name));\n",
    "prefixes": [
        "02/25"
    ]
}