ext4 crypto: shrink size of the ext4_crypto_ctx structure
Some fields are only used when the crypto_ctx is being used on the read path, some are only used on the write path, and some are only used when the structure is on free list. Optimize memory use by using a union. Signed-off-by: Theodore Ts'o <tytso@mit.edu>
This commit is contained in:
@@ -84,7 +84,7 @@ static void ext4_finish_bio(struct bio *bio)
|
||||
/* The bounce data pages are unmapped. */
|
||||
data_page = page;
|
||||
ctx = (struct ext4_crypto_ctx *)page_private(data_page);
|
||||
page = ctx->control_page;
|
||||
page = ctx->w.control_page;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user