aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/jbd2.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/jbd2.h')
-rw-r--r--include/linux/jbd2.h22
1 files changed, 2 insertions, 20 deletions
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h
index 638ce4554c76..1ec876358180 100644
--- a/include/linux/jbd2.h
+++ b/include/linux/jbd2.h
@@ -69,15 +69,8 @@ extern u8 jbd2_journal_enable_debug;
69#define jbd_debug(f, a...) /**/ 69#define jbd_debug(f, a...) /**/
70#endif 70#endif
71 71
72static inline void *jbd2_alloc(size_t size, gfp_t flags) 72extern void *jbd2_alloc(size_t size, gfp_t flags);
73{ 73extern void jbd2_free(void *ptr, size_t size);
74 return (void *)__get_free_pages(flags, get_order(size));
75}
76
77static inline void jbd2_free(void *ptr, size_t size)
78{
79 free_pages((unsigned long)ptr, get_order(size));
80};
81 74
82#define JBD2_MIN_JOURNAL_BLOCKS 1024 75#define JBD2_MIN_JOURNAL_BLOCKS 1024
83 76
@@ -284,19 +277,8 @@ typedef struct journal_superblock_s
284 277
285#define J_ASSERT(assert) BUG_ON(!(assert)) 278#define J_ASSERT(assert) BUG_ON(!(assert))
286 279
287#if defined(CONFIG_BUFFER_DEBUG)
288void buffer_assertion_failure(struct buffer_head *bh);
289#define J_ASSERT_BH(bh, expr) \
290 do { \
291 if (!(expr)) \
292 buffer_assertion_failure(bh); \
293 J_ASSERT(expr); \
294 } while (0)
295#define J_ASSERT_JH(jh, expr) J_ASSERT_BH(jh2bh(jh), expr)
296#else
297#define J_ASSERT_BH(bh, expr) J_ASSERT(expr) 280#define J_ASSERT_BH(bh, expr) J_ASSERT(expr)
298#define J_ASSERT_JH(jh, expr) J_ASSERT(expr) 281#define J_ASSERT_JH(jh, expr) J_ASSERT(expr)
299#endif
300 282
301#if defined(JBD2_PARANOID_IOFAIL) 283#if defined(JBD2_PARANOID_IOFAIL)
302#define J_EXPECT(expr, why...) J_ASSERT(expr) 284#define J_EXPECT(expr, why...) J_ASSERT(expr)