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: Jianpeng Ma <majianpeng@gmail.com>
[Jaegeuk Kim: add description]
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
This commit is contained in:
majianpeng 2013-05-14 20:06:46 +08:00 коммит произвёл Jaegeuk Kim
Родитель 81fb5e8746
Коммит 145b04e5ed
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -175,12 +175,12 @@ get_cache:
static int stat_show(struct seq_file *s, void *v) 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 i = 0;
int j; int j;
mutex_lock(&f2fs_stat_mutex); 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]; char devname[BDEVNAME_SIZE];
update_general_status(si->sbi); update_general_status(si->sbi);