Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ecryptfs: Convert to separately allocated bdi

Allocate struct backing_dev_info separately instead of embedding it
inside the superblock. This unifies handling of bdi among users.

CC: Tyler Hicks <tyhicks@canonical.com>
CC: ecryptfs@vger.kernel.org
Acked-by: Tyler Hicks <tyhicks@canonical.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Jens Axboe <axboe@fb.com>

authored by

Jan Kara and committed by
Jens Axboe
e836818b 851ea086

+1 -4
-1
fs/ecryptfs/ecryptfs_kernel.h
··· 349 349 struct ecryptfs_sb_info { 350 350 struct super_block *wsi_sb; 351 351 struct ecryptfs_mount_crypt_stat mount_crypt_stat; 352 - struct backing_dev_info bdi; 353 352 }; 354 353 355 354 /* file private data. */
+1 -3
fs/ecryptfs/main.c
··· 519 519 goto out; 520 520 } 521 521 522 - rc = bdi_setup_and_register(&sbi->bdi, "ecryptfs"); 522 + rc = super_setup_bdi(s); 523 523 if (rc) 524 524 goto out1; 525 525 526 526 ecryptfs_set_superblock_private(s, sbi); 527 - s->s_bdi = &sbi->bdi; 528 527 529 528 /* ->kill_sb() will take care of sbi after that point */ 530 529 sbi = NULL; ··· 632 633 if (!sb_info) 633 634 return; 634 635 ecryptfs_destroy_mount_crypt_stat(&sb_info->mount_crypt_stat); 635 - bdi_destroy(&sb_info->bdi); 636 636 kmem_cache_free(ecryptfs_sb_info_cache, sb_info); 637 637 } 638 638