summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorAkinobu Mita <akinobu.mita@gmail.com>2008-02-06 01:37:08 -0800
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-06 10:41:05 -0800
commit797074e44d78835adbde2ca527718b0e50226b95 (patch)
tree7a54757b7201f4e0085ad1a654fa319eb7e07816 /fs
parente8462caa915d4d12846db7aae2557b6db7c054d5 (diff)
downloadop-kernel-dev-797074e44d78835adbde2ca527718b0e50226b95.zip
op-kernel-dev-797074e44d78835adbde2ca527718b0e50226b95.tar.gz
fs: use list_for_each_entry_reverse and kill sb_entry
Use list_for_each_entry_reverse for super_blocks list and remove unused sb_entry macro. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/fs-writeback.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
index 0b30640..db80ce9 100644
--- a/fs/fs-writeback.c
+++ b/fs/fs-writeback.c
@@ -515,8 +515,7 @@ writeback_inodes(struct writeback_control *wbc)
might_sleep();
spin_lock(&sb_lock);
restart:
- sb = sb_entry(super_blocks.prev);
- for (; sb != sb_entry(&super_blocks); sb = sb_entry(sb->s_list.prev)) {
+ list_for_each_entry_reverse(sb, &super_blocks, s_list) {
if (sb_has_dirty_inodes(sb)) {
/* we're making our own get_super here */
sb->s_count++;
@@ -581,10 +580,8 @@ static void set_sb_syncing(int val)
{
struct super_block *sb;
spin_lock(&sb_lock);
- sb = sb_entry(super_blocks.prev);
- for (; sb != sb_entry(&super_blocks); sb = sb_entry(sb->s_list.prev)) {
+ list_for_each_entry_reverse(sb, &super_blocks, s_list)
sb->s_syncing = val;
- }
spin_unlock(&sb_lock);
}
OpenPOWER on IntegriCloud