fscrypt: Rename FS_WRITE_PATH_FL to FS_CTX_HAS_BOUNCE_BUFFER_FL
authorDavid Gstir <david@sigma-star.at>
Tue, 6 Dec 2016 22:53:58 +0000 (23:53 +0100)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 11 Dec 2016 21:33:18 +0000 (16:33 -0500)
... to better explain its purpose after introducing in-place encryption
without bounce buffer.

Signed-off-by: David Gstir <david@sigma-star.at>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/crypto/crypto.c
fs/crypto/fscrypt_private.h
include/linux/fscrypto.h

index bc1d4781b9ecdf18002d3d81ec1ddf8cc3fc09dc..ac8e4f6a377331b6202bb1a25545d22592f5ddfa 100644 (file)
@@ -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;
 }
 
index 7ba10cd45a2e54e518589783fcea28223dc9ebc6..aeab032d7d35fcc4e0980342917ce7f2c170cd0d 100644 (file)
@@ -72,7 +72,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_completion_result {
        struct completion completion;
index 1adc1c758d31fb295d5cd0bc881c9e809b4950fc..c074b670aa99d06372fdf473f317772d33150d28 100644 (file)
@@ -21,7 +21,6 @@
 #define FS_CRYPTO_BLOCK_SIZE           16
 
 struct fscrypt_info;
-struct fscrypt_ctx;
 
 struct fscrypt_ctx {
        union {