Skip to content

Commit 280fd42

Browse files
XidianGeneralJaegeuk Kim
authored andcommitted
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: Jia-Ju Bai <[email protected]> Reviewed-by: Chao Yu <[email protected]> Signed-off-by: Jaegeuk Kim <[email protected]>
1 parent 038d069 commit 280fd42

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fs/f2fs/debug.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,15 @@ static void update_general_status(struct f2fs_sb_info *sbi)
6767
si->nr_rd_data = get_pages(sbi, F2FS_RD_DATA);
6868
si->nr_rd_node = get_pages(sbi, F2FS_RD_NODE);
6969
si->nr_rd_meta = get_pages(sbi, F2FS_RD_META);
70-
if (SM_I(sbi) && SM_I(sbi)->fcc_info) {
70+
if (SM_I(sbi)->fcc_info) {
7171
si->nr_flushed =
7272
atomic_read(&SM_I(sbi)->fcc_info->issued_flush);
7373
si->nr_flushing =
7474
atomic_read(&SM_I(sbi)->fcc_info->queued_flush);
7575
si->flush_list_empty =
7676
llist_empty(&SM_I(sbi)->fcc_info->issue_list);
7777
}
78-
if (SM_I(sbi) && SM_I(sbi)->dcc_info) {
78+
if (SM_I(sbi)->dcc_info) {
7979
si->nr_discarded =
8080
atomic_read(&SM_I(sbi)->dcc_info->issued_discard);
8181
si->nr_discarding =

0 commit comments

Comments
 (0)