summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/ext3_jbd.h11
-rw-r--r--include/linux/jbd.h12
2 files changed, 15 insertions, 8 deletions
diff --git a/include/linux/ext3_jbd.h b/include/linux/ext3_jbd.h
index da1c91ef0821..0380c1fbdab0 100644
--- a/include/linux/ext3_jbd.h
+++ b/include/linux/ext3_jbd.h
@@ -138,10 +138,13 @@ ext3_journal_release_buffer(handle_t *handle, struct buffer_head *bh,
journal_release_buffer(handle, bh, credits);
}
-static inline void
-ext3_journal_forget(handle_t *handle, struct buffer_head *bh)
+static inline int
+__ext3_journal_forget(const char *where, handle_t *handle, struct buffer_head *bh)
{
- journal_forget(handle, bh);
+ int err = journal_forget(handle, bh);
+ if (err)
+ ext3_journal_abort_handle(where, __FUNCTION__, bh, handle,err);
+ return err;
}
static inline int
@@ -187,6 +190,8 @@ __ext3_journal_dirty_metadata(const char *where,
__ext3_journal_get_create_access(__FUNCTION__, (handle), (bh))
#define ext3_journal_dirty_metadata(handle, bh) \
__ext3_journal_dirty_metadata(__FUNCTION__, (handle), (bh))
+#define ext3_journal_forget(handle, bh) \
+ __ext3_journal_forget(__FUNCTION__, (handle), (bh))
int ext3_journal_dirty_data(handle_t *handle, struct buffer_head *bh);
diff --git a/include/linux/jbd.h b/include/linux/jbd.h
index 3d9451b62e5a..fbc8eb90ea6f 100644
--- a/include/linux/jbd.h
+++ b/include/linux/jbd.h
@@ -277,13 +277,15 @@ void buffer_assertion_failure(struct buffer_head *bh);
#define J_EXPECT_JH(jh, expr, why...) J_ASSERT_JH(jh, expr)
#else
#define __journal_expect(expr, why...) \
- do { \
- if (!(expr)) { \
+ ({ \
+ int val = (expr); \
+ if (!val) { \
printk(KERN_ERR \
"EXT3-fs unexpected failure: %s;\n",# expr); \
- printk(KERN_ERR why); \
+ printk(KERN_ERR why "\n"); \
} \
- } while (0)
+ val; \
+ })
#define J_EXPECT(expr, why...) __journal_expect(expr, ## why)
#define J_EXPECT_BH(bh, expr, why...) __journal_expect(expr, ## why)
#define J_EXPECT_JH(jh, expr, why...) __journal_expect(expr, ## why)
@@ -874,7 +876,7 @@ extern int journal_dirty_data (handle_t *, struct buffer_head *);
extern int journal_dirty_metadata (handle_t *, struct buffer_head *);
extern void journal_release_buffer (handle_t *, struct buffer_head *,
int credits);
-extern void journal_forget (handle_t *, struct buffer_head *);
+extern int journal_forget (handle_t *, struct buffer_head *);
extern void journal_sync_buffer (struct buffer_head *);
extern int journal_invalidatepage(journal_t *,
struct page *, unsigned long);