Skip to content

Commit

Permalink
[PATCH] Move cond_resched() after iput() in sync_sb_inodes()
Browse files Browse the repository at this point in the history
In here, I think the following order is more cache-friendly.

Signed-off-by: OGAWA Hirofumi <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
OGAWAHirofumi authored and Linus Torvalds committed Mar 25, 2006
1 parent d25b9a1 commit 4ffc844
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/fs-writeback.c
Original file line number Diff line number Diff line change
Expand Up @@ -381,8 +381,8 @@ sync_sb_inodes(struct super_block *sb, struct writeback_control *wbc)
list_move(&inode->i_list, &sb->s_dirty);
}
spin_unlock(&inode_lock);
cond_resched();
iput(inode);
cond_resched();
spin_lock(&inode_lock);
if (wbc->nr_to_write <= 0)
break;
Expand Down

0 comments on commit 4ffc844

Please sign in to comment.