]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
f2fs: use list_for_each_entry rather than list_for_each_entry_safe
authormajianpeng <majianpeng@gmail.com>
Tue, 14 May 2013 12:06:46 +0000 (20:06 +0800)
committerJaegeuk Kim <jaegeuk.kim@samsung.com>
Mon, 20 May 2013 07:05:43 +0000 (16:05 +0900)
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>
fs/f2fs/debug.c

index 8d9943786c318effc179b281ea5d4d34947033ff..0d6c6aafb235b140b3ba44ab7245ba37212b2a27 100644 (file)
@@ -175,12 +175,12 @@ get_cache:
 
 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);