From: David Gstir <david@sigma-star.at>
To: linux-mtd@lists.infradead.org
Cc: tytso@mit.edu, dedekind1@gmail.com, ebiggers@google.com,
mhalcrow@google.com, adrian.hunter@intel.com,
linux-kernel@vger.kernel.org, hch@infradead.org,
linux-fsdevel@vger.kernel.org, jaegeuk@kernel.org,
dengler@linutronix.de, sbabic@denx.de, wd@denx.de,
richard@nod.at, David Gstir <david@sigma-star.at>
Subject: [PATCH v2 6/6] fscrypt: Rename FS_WRITE_PATH_FL to FS_CTX_HAS_BOUNCE_BUFFER_FL
Date: Tue, 6 Dec 2016 23:53:58 +0100 [thread overview]
Message-ID: <20161206225358.12126-7-david@sigma-star.at> (raw)
In-Reply-To: <20161206225358.12126-1-david@sigma-star.at>
... to better explain its purpose after introducing in-place encryption
without bounce buffer.
Signed-off-by: David Gstir <david@sigma-star.at>
---
fs/crypto/crypto.c | 6 +++---
include/linux/fscrypto.h | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/fs/crypto/crypto.c b/fs/crypto/crypto.c
index c1e4316045e9..20dd4402af42 100644
--- a/fs/crypto/crypto.c
+++ b/fs/crypto/crypto.c
@@ -63,7 +63,7 @@ void fscrypt_release_ctx(struct fscrypt_ctx *ctx)
{
unsigned long flags;
- if (ctx->flags & FS_WRITE_PATH_FL && ctx->w.bounce_page) {
+ if (ctx->flags & FS_CTX_HAS_BOUNCE_BUFFER_FL && ctx->w.bounce_page) {
mempool_free(ctx->w.bounce_page, fscrypt_bounce_page_pool);
ctx->w.bounce_page = NULL;
}
@@ -121,7 +121,7 @@ struct fscrypt_ctx *fscrypt_get_ctx(const struct inode *inode, gfp_t gfp_flags)
} else {
ctx->flags &= ~FS_CTX_REQUIRES_FREE_ENCRYPT_FL;
}
- ctx->flags &= ~FS_WRITE_PATH_FL;
+ ctx->flags &= ~FS_CTX_HAS_BOUNCE_BUFFER_FL;
return ctx;
}
EXPORT_SYMBOL(fscrypt_get_ctx);
@@ -210,7 +210,7 @@ static struct page *alloc_bounce_page(struct fscrypt_ctx *ctx, gfp_t gfp_flags)
ctx->w.bounce_page = mempool_alloc(fscrypt_bounce_page_pool, gfp_flags);
if (ctx->w.bounce_page == NULL)
return ERR_PTR(-ENOMEM);
- ctx->flags |= FS_WRITE_PATH_FL;
+ ctx->flags |= FS_CTX_HAS_BOUNCE_BUFFER_FL;
return ctx->w.bounce_page;
}
diff --git a/include/linux/fscrypto.h b/include/linux/fscrypto.h
index 6039c86ff849..00aa834bf2d9 100644
--- a/include/linux/fscrypto.h
+++ b/include/linux/fscrypto.h
@@ -84,7 +84,7 @@ struct fscrypt_info {
};
#define FS_CTX_REQUIRES_FREE_ENCRYPT_FL 0x00000001
-#define FS_WRITE_PATH_FL 0x00000002
+#define FS_CTX_HAS_BOUNCE_BUFFER_FL 0x00000002
struct fscrypt_ctx {
union {
--
2.10.1
next prev parent reply other threads:[~2016-12-06 22:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-06 22:53 [PATCH v2 0/6] UBIFS related fscrypt updates David Gstir
2016-12-06 22:53 ` [PATCH v2 1/6] fscrypt: Use correct index in decrypt path David Gstir
2016-12-06 22:53 ` [PATCH v2 2/6] fscrypt: Never allocate fscrypt_ctx on in-place encryption David Gstir
2016-12-06 22:53 ` [PATCH v2 3/6] fscrypt: Cleanup fscrypt_{decrypt,encrypt}_page() David Gstir
2016-12-06 22:53 ` [PATCH v2 4/6] fscrypt: Cleanup page locking requirements for fscrypt_{decrypt,encrypt}_page() David Gstir
2016-12-06 22:53 ` [PATCH v2 5/6] fscrypt: Delay bounce page pool allocation until needed David Gstir
2016-12-06 22:53 ` David Gstir [this message]
2016-12-13 3:01 ` [PATCH v2 0/6] UBIFS related fscrypt updates Theodore Ts'o
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161206225358.12126-7-david@sigma-star.at \
--to=david@sigma-star.at \
--cc=adrian.hunter@intel.com \
--cc=dedekind1@gmail.com \
--cc=dengler@linutronix.de \
--cc=ebiggers@google.com \
--cc=hch@infradead.org \
--cc=jaegeuk@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=mhalcrow@google.com \
--cc=richard@nod.at \
--cc=sbabic@denx.de \
--cc=tytso@mit.edu \
--cc=wd@denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®