Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=797074e44d78835adbde2ca527718b0e50226b95
Commit:     797074e44d78835adbde2ca527718b0e50226b95
Parent:     e8462caa915d4d12846db7aae2557b6db7c054d5
Author:     Akinobu Mita <[EMAIL PROTECTED]>
AuthorDate: Wed Feb 6 01:37:08 2008 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Wed Feb 6 10:41:05 2008 -0800

    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 <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 fs/fs-writeback.c  |    7 ++-----
 include/linux/fs.h |    1 -
 2 files changed, 2 insertions(+), 6 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);
 }
 
diff --git a/include/linux/fs.h b/include/linux/fs.h
index e260d9a..19aab50 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -977,7 +977,6 @@ extern int send_sigurg(struct fown_struct *fown);
 extern struct list_head super_blocks;
 extern spinlock_t sb_lock;
 
-#define sb_entry(list) list_entry((list), struct super_block, s_list)
 #define S_BIAS (1<<30)
 struct super_block {
        struct list_head        s_list;         /* Keep this first */
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to