Commit 145b04e5 authored by majianpeng's avatar majianpeng Committed by Jaegeuk Kim

f2fs: use list_for_each_entry rather than list_for_each_entry_safe

We can do this, since now we use a global mutex, f2fs_stat_mutex to protect its
list operations.
Signed-off-by: default avatarJianpeng Ma <majianpeng@gmail.com>
[Jaegeuk Kim: add description]
Signed-off-by: default avatarJaegeuk Kim <jaegeuk.kim@samsung.com>
parent 81fb5e87
......@@ -175,12 +175,12 @@ static void update_mem_info(struct f2fs_sb_info *sbi)
static int stat_show(struct seq_file *s, void *v)
{
struct f2fs_stat_info *si, *next;
struct f2fs_stat_info *si;
int i = 0;
int j;
mutex_lock(&f2fs_stat_mutex);
list_for_each_entry_safe(si, next, &f2fs_stat_list, stat_list) {
list_for_each_entry(si, &f2fs_stat_list, stat_list) {
char devname[BDEVNAME_SIZE];
update_general_status(si->sbi);
......
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