ext4: rename system_blks to s_system_blks inside ext4_sb_info

Rename system_blks to s_system_blks inside ext4_sb_info, keep
the naming rules consistent with other variables, which is
convenient for code reading and writing.

Signed-off-by: Chunguang Xu <brookxu@tencent.com>
Reviewed-by: Andreas Dilger <adilger@dilger.ca>
Reviewed-by: Ritesh Harjani <riteshh@linux.ibm.com>
Link: https://lore.kernel.org/r/1600916623-544-2-git-send-email-brookxu@tencent.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
This commit is contained in:
Chunguang Xu 2020-09-24 11:03:43 +08:00 committed by Theodore Ts'o
parent ee7ed3aa0f
commit dd0db94f30
3 changed files with 9 additions and 9 deletions

View File

@ -131,7 +131,7 @@ static void debug_print_tree(struct ext4_sb_info *sbi)
printk(KERN_INFO "System zones: "); printk(KERN_INFO "System zones: ");
rcu_read_lock(); rcu_read_lock();
system_blks = rcu_dereference(sbi->system_blks); system_blks = rcu_dereference(sbi->s_system_blks);
node = rb_first(&system_blks->root); node = rb_first(&system_blks->root);
while (node) { while (node) {
entry = rb_entry(node, struct ext4_system_zone, node); entry = rb_entry(node, struct ext4_system_zone, node);
@ -261,7 +261,7 @@ int ext4_setup_system_zone(struct super_block *sb)
* with ext4_data_block_valid() accessing the rbtree at the same * with ext4_data_block_valid() accessing the rbtree at the same
* time. * time.
*/ */
rcu_assign_pointer(sbi->system_blks, system_blks); rcu_assign_pointer(sbi->s_system_blks, system_blks);
if (test_opt(sb, DEBUG)) if (test_opt(sb, DEBUG))
debug_print_tree(sbi); debug_print_tree(sbi);
@ -286,9 +286,9 @@ void ext4_release_system_zone(struct super_block *sb)
{ {
struct ext4_system_blocks *system_blks; struct ext4_system_blocks *system_blks;
system_blks = rcu_dereference_protected(EXT4_SB(sb)->system_blks, system_blks = rcu_dereference_protected(EXT4_SB(sb)->s_system_blks,
lockdep_is_held(&sb->s_umount)); lockdep_is_held(&sb->s_umount));
rcu_assign_pointer(EXT4_SB(sb)->system_blks, NULL); rcu_assign_pointer(EXT4_SB(sb)->s_system_blks, NULL);
if (system_blks) if (system_blks)
call_rcu(&system_blks->rcu, ext4_destroy_system_zone); call_rcu(&system_blks->rcu, ext4_destroy_system_zone);
@ -319,7 +319,7 @@ int ext4_inode_block_valid(struct inode *inode, ext4_fsblk_t start_blk,
* mount option. * mount option.
*/ */
rcu_read_lock(); rcu_read_lock();
system_blks = rcu_dereference(sbi->system_blks); system_blks = rcu_dereference(sbi->s_system_blks);
if (system_blks == NULL) if (system_blks == NULL)
goto out_rcu; goto out_rcu;

View File

@ -1487,7 +1487,7 @@ struct ext4_sb_info {
int s_jquota_fmt; /* Format of quota to use */ int s_jquota_fmt; /* Format of quota to use */
#endif #endif
unsigned int s_want_extra_isize; /* New inodes should reserve # bytes */ unsigned int s_want_extra_isize; /* New inodes should reserve # bytes */
struct ext4_system_blocks __rcu *system_blks; struct ext4_system_blocks __rcu *s_system_blks;
#ifdef EXTENTS_STATS #ifdef EXTENTS_STATS
/* ext4 extents stats */ /* ext4 extents stats */

View File

@ -5772,7 +5772,7 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data)
* Releasing of existing data is done when we are sure remount will * Releasing of existing data is done when we are sure remount will
* succeed. * succeed.
*/ */
if (test_opt(sb, BLOCK_VALIDITY) && !sbi->system_blks) { if (test_opt(sb, BLOCK_VALIDITY) && !sbi->s_system_blks) {
err = ext4_setup_system_zone(sb); err = ext4_setup_system_zone(sb);
if (err) if (err)
goto restore_opts; goto restore_opts;
@ -5798,7 +5798,7 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data)
} }
} }
#endif #endif
if (!test_opt(sb, BLOCK_VALIDITY) && sbi->system_blks) if (!test_opt(sb, BLOCK_VALIDITY) && sbi->s_system_blks)
ext4_release_system_zone(sb); ext4_release_system_zone(sb);
/* /*
@ -5821,7 +5821,7 @@ restore_opts:
sbi->s_commit_interval = old_opts.s_commit_interval; sbi->s_commit_interval = old_opts.s_commit_interval;
sbi->s_min_batch_time = old_opts.s_min_batch_time; sbi->s_min_batch_time = old_opts.s_min_batch_time;
sbi->s_max_batch_time = old_opts.s_max_batch_time; sbi->s_max_batch_time = old_opts.s_max_batch_time;
if (!test_opt(sb, BLOCK_VALIDITY) && sbi->system_blks) if (!test_opt(sb, BLOCK_VALIDITY) && sbi->s_system_blks)
ext4_release_system_zone(sb); ext4_release_system_zone(sb);
#ifdef CONFIG_QUOTA #ifdef CONFIG_QUOTA
sbi->s_jquota_fmt = old_opts.s_jquota_fmt; sbi->s_jquota_fmt = old_opts.s_jquota_fmt;