Commit 65458f96 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

Merge kroah.com:/home/greg/linux/BK/bleed-2.5

into kroah.com:/home/greg/linux/BK/pci-2.5
parents a4e90313 201be7ab
...@@ -175,7 +175,7 @@ extern spinlock_t dcache_lock; ...@@ -175,7 +175,7 @@ extern spinlock_t dcache_lock;
static inline void __d_drop(struct dentry *dentry) static inline void __d_drop(struct dentry *dentry)
{ {
dentry->d_vfs_flags |= DCACHE_UNHASHED; dentry->d_vfs_flags |= DCACHE_UNHASHED;
hlist_del_rcu(&dentry->d_hash); hlist_del_rcu_init(&dentry->d_hash);
} }
static inline void d_drop(struct dentry *dentry) static inline void d_drop(struct dentry *dentry)
......
...@@ -7,6 +7,14 @@ ...@@ -7,6 +7,14 @@
#include <linux/prefetch.h> #include <linux/prefetch.h>
#include <asm/system.h> #include <asm/system.h>
/*
* These are non-NULL pointers that will result in page faults
* under normal circumstances, used to verify that nobody uses
* non-initialized list entries.
*/
#define LIST_POISON1 ((void *) 0x00100100)
#define LIST_POISON2 ((void *) 0x00200200)
/* /*
* Simple doubly linked list implementation. * Simple doubly linked list implementation.
* *
...@@ -137,7 +145,10 @@ static inline void __list_del(struct list_head * prev, struct list_head * next) ...@@ -137,7 +145,10 @@ static inline void __list_del(struct list_head * prev, struct list_head * next)
static inline void list_del(struct list_head *entry) static inline void list_del(struct list_head *entry)
{ {
__list_del(entry->prev, entry->next); __list_del(entry->prev, entry->next);
entry->next = LIST_POISON1;
entry->prev = LIST_POISON2;
} }
/** /**
* list_del_rcu - deletes entry from list without re-initialization * list_del_rcu - deletes entry from list without re-initialization
* @entry: the element to delete from the list. * @entry: the element to delete from the list.
...@@ -148,6 +159,8 @@ static inline void list_del(struct list_head *entry) ...@@ -148,6 +159,8 @@ static inline void list_del(struct list_head *entry)
static inline void list_del_rcu(struct list_head *entry) static inline void list_del_rcu(struct list_head *entry)
{ {
__list_del(entry->prev, entry->next); __list_del(entry->prev, entry->next);
entry->next = LIST_POISON1;
entry->prev = LIST_POISON2;
} }
/** /**
...@@ -399,8 +412,9 @@ static __inline__ void __hlist_del(struct hlist_node *n) ...@@ -399,8 +412,9 @@ static __inline__ void __hlist_del(struct hlist_node *n)
static __inline__ void hlist_del(struct hlist_node *n) static __inline__ void hlist_del(struct hlist_node *n)
{ {
if (n->pprev) __hlist_del(n);
__hlist_del(n); n->next = LIST_POISON1;
n->pprev = LIST_POISON2;
} }
#define hlist_del_rcu hlist_del /* list_del_rcu is identical too? */ #define hlist_del_rcu hlist_del /* list_del_rcu is identical too? */
...@@ -413,6 +427,8 @@ static __inline__ void hlist_del_init(struct hlist_node *n) ...@@ -413,6 +427,8 @@ static __inline__ void hlist_del_init(struct hlist_node *n)
} }
} }
#define hlist_del_rcu_init hlist_del_init
static __inline__ void hlist_add_head(struct hlist_node *n, struct hlist_head *h) static __inline__ void hlist_add_head(struct hlist_node *n, struct hlist_head *h)
{ {
struct hlist_node *first = h->first; struct hlist_node *first = h->first;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment