Commit 280fd422 authored by Jia-Ju Bai's avatar Jia-Ju Bai Committed by Jaegeuk Kim

fs: f2fs: Remove unnecessary checks of SM_I(sbi) in update_general_status()

In fill_super() and put_super(), f2fs_destroy_stats() is called
in prior to f2fs_destroy_segment_manager(), so if current
sbi can still be visited in global stat list, SM_I(sbi) should be
released yet.
For this reason, SM_I(sbi) does not need to be checked in
update_general_status().
Thank Chao Yu for advice.
Signed-off-by: default avatarJia-Ju Bai <baijiaju1990@gmail.com>
Reviewed-by: default avatarChao Yu <yuchao0@huawei.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent 038d0698
...@@ -67,7 +67,7 @@ static void update_general_status(struct f2fs_sb_info *sbi) ...@@ -67,7 +67,7 @@ static void update_general_status(struct f2fs_sb_info *sbi)
si->nr_rd_data = get_pages(sbi, F2FS_RD_DATA); si->nr_rd_data = get_pages(sbi, F2FS_RD_DATA);
si->nr_rd_node = get_pages(sbi, F2FS_RD_NODE); si->nr_rd_node = get_pages(sbi, F2FS_RD_NODE);
si->nr_rd_meta = get_pages(sbi, F2FS_RD_META); si->nr_rd_meta = get_pages(sbi, F2FS_RD_META);
if (SM_I(sbi) && SM_I(sbi)->fcc_info) { if (SM_I(sbi)->fcc_info) {
si->nr_flushed = si->nr_flushed =
atomic_read(&SM_I(sbi)->fcc_info->issued_flush); atomic_read(&SM_I(sbi)->fcc_info->issued_flush);
si->nr_flushing = si->nr_flushing =
...@@ -75,7 +75,7 @@ static void update_general_status(struct f2fs_sb_info *sbi) ...@@ -75,7 +75,7 @@ static void update_general_status(struct f2fs_sb_info *sbi)
si->flush_list_empty = si->flush_list_empty =
llist_empty(&SM_I(sbi)->fcc_info->issue_list); llist_empty(&SM_I(sbi)->fcc_info->issue_list);
} }
if (SM_I(sbi) && SM_I(sbi)->dcc_info) { if (SM_I(sbi)->dcc_info) {
si->nr_discarded = si->nr_discarded =
atomic_read(&SM_I(sbi)->dcc_info->issued_discard); atomic_read(&SM_I(sbi)->dcc_info->issued_discard);
si->nr_discarding = si->nr_discarding =
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment