Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1537312
| From | David Gstir <david@sigma-star.at> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v2 6/6] fscrypt: Rename FS_WRITE_PATH_FL to FS_CTX_HAS_BOUNCE_BUFFER_FL |
| Date | 2016-12-07 00:00 +0100 |
| Message-ID | <sLwSm-8cn-29@gated-at.bofh.it> (permalink) |
| References | <sLwSl-8cn-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
... 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
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 0/6] UBIFS related fscrypt updates David Gstir <david@sigma-star.at> - 2016-12-07 00:00 +0100
[PATCH v2 6/6] fscrypt: Rename FS_WRITE_PATH_FL to FS_CTX_HAS_BOUNCE_BUFFER_FL David Gstir <david@sigma-star.at> - 2016-12-07 00:00 +0100
[PATCH v2 5/6] fscrypt: Delay bounce page pool allocation until needed David Gstir <david@sigma-star.at> - 2016-12-07 00:00 +0100
[PATCH v2 3/6] fscrypt: Cleanup fscrypt_{decrypt,encrypt}_page() David Gstir <david@sigma-star.at> - 2016-12-07 00:00 +0100
[PATCH v2 1/6] fscrypt: Use correct index in decrypt path. David Gstir <david@sigma-star.at> - 2016-12-07 00:00 +0100
csiph-web