Skip to content

Commit e836818

Browse files
jankaraaxboe
authored andcommitted
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>
1 parent 851ea08 commit e836818

2 files changed

Lines changed: 1 addition & 4 deletions

File tree

‎fs/ecryptfs/ecryptfs_kernel.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,6 @@ struct ecryptfs_mount_crypt_stat {
349349
struct ecryptfs_sb_info {
350350
struct super_block *wsi_sb;
351351
struct ecryptfs_mount_crypt_stat mount_crypt_stat;
352-
struct backing_dev_info bdi;
353352
};
354353

355354
/* file private data. */

‎fs/ecryptfs/main.c‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -519,12 +519,11 @@ static struct dentry *ecryptfs_mount(struct file_system_type *fs_type, int flags
519519
goto out;
520520
}
521521

522-
rc = bdi_setup_and_register(&sbi->bdi, "ecryptfs");
522+
rc = super_setup_bdi(s);
523523
if (rc)
524524
goto out1;
525525

526526
ecryptfs_set_superblock_private(s, sbi);
527-
s->s_bdi = &sbi->bdi;
528527

529528
/* ->kill_sb() will take care of sbi after that point */
530529
sbi = NULL;
@@ -633,7 +632,6 @@ static void ecryptfs_kill_block_super(struct super_block *sb)
633632
if (!sb_info)
634633
return;
635634
ecryptfs_destroy_mount_crypt_stat(&sb_info->mount_crypt_stat);
636-
bdi_destroy(&sb_info->bdi);
637635
kmem_cache_free(ecryptfs_sb_info_cache, sb_info);
638636
}
639637

0 commit comments

Comments
 (0)