summaryrefslogtreecommitdiff
path: root/fs/jbd2/commit.c
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2009-12-01 09:04:42 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2009-12-14 09:45:10 -0800
commit86d291a39650e05c9db7c0d849e48beaf39efcdd (patch)
treea9184ecdab12cc0ee4f01d5353b7c5c1b5039671 /fs/jbd2/commit.c
parentce5cf38ef17272ad2641c723c6d0d8eaf1c34eab (diff)
jbd2: Add ENOMEM checking in and for jbd2_journal_write_metadata_buffer()
(cherry picked from commit e6ec116b67f46e0e7808276476554727b2e6240b) OOM happens. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'fs/jbd2/commit.c')
-rw-r--r--fs/jbd2/commit.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/jbd2/commit.c b/fs/jbd2/commit.c
index d4cfd6d2779e..8896c1d4febe 100644
--- a/fs/jbd2/commit.c
+++ b/fs/jbd2/commit.c
@@ -636,6 +636,10 @@ void jbd2_journal_commit_transaction(journal_t *journal)
JBUFFER_TRACE(jh, "ph3: write metadata");
flags = jbd2_journal_write_metadata_buffer(commit_transaction,
jh, &new_jh, blocknr);
+ if (flags < 0) {
+ jbd2_journal_abort(journal, flags);
+ continue;
+ }
set_bit(BH_JWrite, &jh2bh(new_jh)->b_state);
wbuf[bufs++] = jh2bh(new_jh);