The patch titled
fs: use list_for_each_entry_reverse and kill sb_entry
has been added to the -mm tree. Its filename is
fs-use-list_for_each_entry_reverse-and-kill-sb_entry.patch
*** Remember to use Documentation/SubmitChecklist when testing your code ***
See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this
------------------------------------------------------
Subject: fs: use list_for_each_entry_reverse and kill sb_entry
From: Akinobu Mita <[EMAIL PROTECTED]>
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]>
---
fs/fs-writeback.c | 7 ++-----
include/linux/fs.h | 1 -
2 files changed, 2 insertions(+), 6 deletions(-)
diff -puN
fs/fs-writeback.c~fs-use-list_for_each_entry_reverse-and-kill-sb_entry
fs/fs-writeback.c
--- a/fs/fs-writeback.c~fs-use-list_for_each_entry_reverse-and-kill-sb_entry
+++ a/fs/fs-writeback.c
@@ -514,8 +514,7 @@ writeback_inodes(struct writeback_contro
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++;
@@ -580,10 +579,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 -puN
include/linux/fs.h~fs-use-list_for_each_entry_reverse-and-kill-sb_entry
include/linux/fs.h
--- a/include/linux/fs.h~fs-use-list_for_each_entry_reverse-and-kill-sb_entry
+++ a/include/linux/fs.h
@@ -974,7 +974,6 @@ extern int send_sigurg(struct fown_struc
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 */
_
Patches currently in -mm which might be from [EMAIL PROTECTED] are
fs-use-hlist_unhashed.patch
power-use-kasprintf.patch
partitions-use-kasprintf.patch
fs-use-list_for_each_entry_reverse-and-kill-sb_entry.patch
-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html