Skip to content

Commit c1844d5

Browse files
jankaraaxboe
authored andcommitted
fs: Remove SB_I_DYNBDI flag
Now that all bdi structures filesystems use are properly refcounted, we can remove the SB_I_DYNBDI flag. Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Jan Kara <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
1 parent 99edd45 commit c1844d5

File tree

6 files changed

+1
-11
lines changed

6 files changed

+1
-11
lines changed

drivers/mtd/mtdsuper.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ static int get_sb_mtd_set(struct super_block *sb, void *_mtd)
5353
sb->s_mtd = mtd;
5454
sb->s_dev = MKDEV(MTD_BLOCK_MAJOR, mtd->index);
5555
sb->s_bdi = bdi_get(mtd_bdi);
56-
sb->s_iflags |= SB_I_DYNBDI;
5756

5857
return 0;
5958
}

fs/gfs2/ops_fstype.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1224,7 +1224,6 @@ static int set_gfs2_super(struct super_block *s, void *data)
12241224
s->s_bdev = data;
12251225
s->s_dev = s->s_bdev->bd_dev;
12261226
s->s_bdi = bdi_get(s->s_bdev->bd_bdi);
1227-
s->s_iflags |= SB_I_DYNBDI;
12281227
return 0;
12291228
}
12301229

fs/nfs/super.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2379,7 +2379,6 @@ int nfs_clone_super(struct super_block *sb, struct nfs_mount_info *mount_info)
23792379
nfs_initialise_sb(sb);
23802380

23812381
sb->s_bdi = bdi_get(old_sb->s_bdi);
2382-
sb->s_iflags |= SB_I_DYNBDI;
23832382

23842383
return 0;
23852384
}

fs/nilfs2/super.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1069,7 +1069,6 @@ nilfs_fill_super(struct super_block *sb, void *data, int silent)
10691069
sb->s_max_links = NILFS_LINK_MAX;
10701070

10711071
sb->s_bdi = bdi_get(sb->s_bdev->bd_bdi);
1072-
sb->s_iflags |= SB_I_DYNBDI;
10731072

10741073
err = load_nilfs(nilfs, sb);
10751074
if (err)

fs/super.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -446,10 +446,9 @@ void generic_shutdown_super(struct super_block *sb)
446446
hlist_del_init(&sb->s_instances);
447447
spin_unlock(&sb_lock);
448448
up_write(&sb->s_umount);
449-
if (sb->s_iflags & SB_I_DYNBDI) {
449+
if (sb->s_bdi != &noop_backing_dev_info) {
450450
bdi_put(sb->s_bdi);
451451
sb->s_bdi = &noop_backing_dev_info;
452-
sb->s_iflags &= ~SB_I_DYNBDI;
453452
}
454453
}
455454

@@ -1055,7 +1054,6 @@ static int set_bdev_super(struct super_block *s, void *data)
10551054
s->s_bdev = data;
10561055
s->s_dev = s->s_bdev->bd_dev;
10571056
s->s_bdi = bdi_get(s->s_bdev->bd_bdi);
1058-
s->s_iflags |= SB_I_DYNBDI;
10591057

10601058
return 0;
10611059
}
@@ -1282,7 +1280,6 @@ int super_setup_bdi_name(struct super_block *sb, char *fmt, ...)
12821280
}
12831281
WARN_ON(sb->s_bdi != &noop_backing_dev_info);
12841282
sb->s_bdi = bdi;
1285-
sb->s_iflags |= SB_I_DYNBDI;
12861283

12871284
return 0;
12881285
}

include/linux/fs.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1272,9 +1272,6 @@ struct mm_struct;
12721272
/* sb->s_iflags to limit user namespace mounts */
12731273
#define SB_I_USERNS_VISIBLE 0x00000010 /* fstype already mounted */
12741274

1275-
/* Temporary flag until all filesystems are converted to dynamic bdis */
1276-
#define SB_I_DYNBDI 0x00000100
1277-
12781275
/* Possible states of 'frozen' field */
12791276
enum {
12801277
SB_UNFROZEN = 0, /* FS is unfrozen */

0 commit comments

Comments
 (0)