diff options
| author | Andrew Morton <akpm@digeo.com> | 2003-06-17 18:27:13 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2003-06-17 18:27:13 -0700 |
| commit | 6fe2ab381e596c2c837d7bbbb085f5dfbc369cd9 (patch) | |
| tree | ee43d8aa7687ef08e9be8aed4207563f0f71ae9e /include/linux/jbd.h | |
| parent | 13d8498a97a9e6a120b433cfce1d7b0622a23863 (diff) | |
[PATCH] JBD: remove jh_splice_lock
This was a strange spinlock which was designed to prevent another CPU from
ripping a buffer's journal_head away while this CPU was inspecting its state.
Really, we don't need it - we can inspect that state directly from bh->b_state.
So kill it off, along with a few things which used it which are themselves
not actually used any more.
Diffstat (limited to 'include/linux/jbd.h')
| -rw-r--r-- | include/linux/jbd.h | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/include/linux/jbd.h b/include/linux/jbd.h index db0ca9d3beb9..142ba2f2475d 100644 --- a/include/linux/jbd.h +++ b/include/linux/jbd.h @@ -1084,50 +1084,6 @@ extern int jbd_blocks_per_page(struct inode *inode); #ifdef __KERNEL__ -extern spinlock_t jh_splice_lock; -/* - * Once `expr1' has been found true, take jh_splice_lock - * and then reevaluate everything. - */ -#define SPLICE_LOCK(expr1, expr2) \ - ({ \ - int ret = (expr1); \ - if (ret) { \ - spin_lock(&jh_splice_lock); \ - ret = (expr1) && (expr2); \ - spin_unlock(&jh_splice_lock); \ - } \ - ret; \ - }) - -/* - * A number of buffer state predicates. They test for - * buffer_jbd() because they are used in core kernel code. - * - * These will be racy on SMP unless we're *sure* that the - * buffer won't be detached from the journalling system - * in parallel. - */ - -/* Return true if the buffer is on journal list `list' */ -static inline int buffer_jlist_eq(struct buffer_head *bh, int list) -{ - return SPLICE_LOCK(buffer_jbd(bh), bh2jh(bh)->b_jlist == list); -} - -/* Return true if this bufer is dirty wrt the journal */ -static inline int buffer_jdirty(struct buffer_head *bh) -{ - return buffer_jbd(bh) && buffer_jbddirty(bh); -} - -/* Return true if it's a data buffer which journalling is managing */ -static inline int buffer_jbd_data(struct buffer_head *bh) -{ - return SPLICE_LOCK(buffer_jbd(bh), - bh2jh(bh)->b_jlist == BJ_SyncData); -} - #ifdef CONFIG_SMP #define assert_spin_locked(lock) J_ASSERT(spin_is_locked(lock)) #else @@ -1155,7 +1111,6 @@ static inline int buffer_jbd_data(struct buffer_head *bh) #define J_ASSERT(expr) do {} while (0) #define J_ASSERT_BH(bh, expr) do {} while (0) #define buffer_jbd(bh) 0 -#define buffer_jlist_eq(bh, val) 0 #define journal_buffer_journal_lru(bh) 0 #endif /* defined(__KERNEL__) && !defined(CONFIG_JBD) */ |
