Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@home.transmeta.com>2002-05-05 06:01:17 -0700
committerLinus Torvalds <torvalds@home.transmeta.com>2002-05-05 06:01:17 -0700
commit7c962f79a385b9c6186427d1f2aac81fedfd9c90 (patch)
treeb5e777e751348a4bc3db0afb7309288a7c01aea3
parentac0f5e76ba898ca47d40c0fe65be2801fa9fab64 (diff)
Fix missed parts in the BH locking patch
-rw-r--r--fs/reiserfs/inode.c4
-rw-r--r--include/linux/list.h8
2 files changed, 10 insertions, 2 deletions
diff --git a/fs/reiserfs/inode.c b/fs/reiserfs/inode.c
index 77ba9219bdfb..b57eeefef8bb 100644
--- a/fs/reiserfs/inode.c
+++ b/fs/reiserfs/inode.c
@@ -105,9 +105,9 @@ inline void make_le_item_head (struct item_head * ih, const struct cpu_key * key
}
static void add_to_flushlist(struct inode *inode, struct buffer_head *bh) {
- struct reiserfs_journal *j = &(SB_JOURNAL(inode->i_sb)) ;
+ struct reiserfs_journal *j = SB_JOURNAL(inode->i_sb) ;
- buffer_insert_list(j->dirty_buffers_lock, bh, j->j_dirty_buffers) ;
+ buffer_insert_list(&j->j_dirty_buffers_lock, bh, &j->j_dirty_buffers) ;
}
//
diff --git a/include/linux/list.h b/include/linux/list.h
index 8c03f2f35082..99da4ab62ec2 100644
--- a/include/linux/list.h
+++ b/include/linux/list.h
@@ -153,6 +153,14 @@ static __inline__ void list_splice(struct list_head *list, struct list_head *hea
#define list_for_each(pos, head) \
for (pos = (head)->next, prefetch(pos->next); pos != (head); \
pos = pos->next, prefetch(pos->next))
+/**
+ * list_for_each_prev - iterate over a list backwards
+ * @pos: the &struct list_head to use as a loop counter.
+ * @head: the head for your list.
+ */
+#define list_for_each_prev(pos, head) \
+ for (pos = (head)->prev, prefetch(pos->prev); pos != (head); \
+ pos = pos->prev, prefetch(pos->prev))
/**
* list_for_each_safe - iterate over a list safe against removal of list entry