Skip to content

Commit

Permalink
f2fs: use list_for_each_entry rather than list_for_each_entry_safe
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
majianpeng authored and Jaegeuk Kim committed May 28, 2013
1 parent 81fb5e8 commit 145b04e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/f2fs/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 145b04e

Please sign in to comment.