File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -53,9 +53,8 @@ EXPORT_SYMBOL(fscrypt_decrypt_bio);
5353
5454static void completion_pages (struct work_struct * work )
5555{
56- struct fscrypt_ctx * ctx =
57- container_of (work , struct fscrypt_ctx , r .work );
58- struct bio * bio = ctx -> r .bio ;
56+ struct fscrypt_ctx * ctx = container_of (work , struct fscrypt_ctx , work );
57+ struct bio * bio = ctx -> bio ;
5958
6059 __fscrypt_decrypt_bio (bio , true);
6160 fscrypt_release_ctx (ctx );
@@ -64,9 +63,9 @@ static void completion_pages(struct work_struct *work)
6463
6564void fscrypt_enqueue_decrypt_bio (struct fscrypt_ctx * ctx , struct bio * bio )
6665{
67- INIT_WORK (& ctx -> r . work , completion_pages );
68- ctx -> r . bio = bio ;
69- fscrypt_enqueue_decrypt_work (& ctx -> r . work );
66+ INIT_WORK (& ctx -> work , completion_pages );
67+ ctx -> bio = bio ;
68+ fscrypt_enqueue_decrypt_work (& ctx -> work );
7069}
7170EXPORT_SYMBOL (fscrypt_enqueue_decrypt_bio );
7271
Original file line number Diff line number Diff line change @@ -59,11 +59,11 @@ void fscrypt_enqueue_decrypt_work(struct work_struct *work)
5959EXPORT_SYMBOL (fscrypt_enqueue_decrypt_work );
6060
6161/**
62- * fscrypt_release_ctx() - Releases an encryption context
63- * @ctx: The encryption context to release.
62+ * fscrypt_release_ctx() - Release a decryption context
63+ * @ctx: The decryption context to release.
6464 *
65- * If the encryption context was allocated from the pre-allocated pool, returns
66- * it to that pool. Else, frees it.
65+ * If the decryption context was allocated from the pre-allocated pool, return
66+ * it to that pool. Else, free it.
6767 */
6868void fscrypt_release_ctx (struct fscrypt_ctx * ctx )
6969{
@@ -80,12 +80,12 @@ void fscrypt_release_ctx(struct fscrypt_ctx *ctx)
8080EXPORT_SYMBOL (fscrypt_release_ctx );
8181
8282/**
83- * fscrypt_get_ctx() - Gets an encryption context
83+ * fscrypt_get_ctx() - Get a decryption context
8484 * @gfp_flags: The gfp flag for memory allocation
8585 *
86- * Allocates and initializes an encryption context.
86+ * Allocate and initialize a decryption context.
8787 *
88- * Return: A new encryption context on success; an ERR_PTR() otherwise.
88+ * Return: A new decryption context on success; an ERR_PTR() otherwise.
8989 */
9090struct fscrypt_ctx * fscrypt_get_ctx (gfp_t gfp_flags )
9191{
Original file line number Diff line number Diff line change @@ -63,16 +63,13 @@ struct fscrypt_operations {
6363 unsigned int max_namelen ;
6464};
6565
66+ /* Decryption work */
6667struct fscrypt_ctx {
6768 union {
68- struct {
69- struct page * bounce_page ; /* Ciphertext page */
70- struct page * control_page ; /* Original page */
71- } w ;
7269 struct {
7370 struct bio * bio ;
7471 struct work_struct work ;
75- } r ;
72+ };
7673 struct list_head free_list ; /* Free list */
7774 };
7875 u8 flags ; /* Flags */
You can’t perform that action at this time.
0 commit comments