Merge tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso...
[linux-2.6-microblaze.git] / fs / jbd2 / transaction.c
index 081dff0..01e4652 100644 (file)
@@ -966,14 +966,8 @@ repeat:
                if (!frozen_buffer) {
                        JBUFFER_TRACE(jh, "allocate memory for buffer");
                        jbd_unlock_bh_state(bh);
-                       frozen_buffer = jbd2_alloc(jh2bh(jh)->b_size, GFP_NOFS);
-                       if (!frozen_buffer) {
-                               printk(KERN_ERR "%s: OOM for frozen_buffer\n",
-                                      __func__);
-                               JBUFFER_TRACE(jh, "oom!");
-                               error = -ENOMEM;
-                               goto out;
-                       }
+                       frozen_buffer = jbd2_alloc(jh2bh(jh)->b_size,
+                                                  GFP_NOFS | __GFP_NOFAIL);
                        goto repeat;
                }
                jh->b_frozen_data = frozen_buffer;
@@ -1226,15 +1220,9 @@ int jbd2_journal_get_undo_access(handle_t *handle, struct buffer_head *bh)
                goto out;
 
 repeat:
-       if (!jh->b_committed_data) {
-               committed_data = jbd2_alloc(jh2bh(jh)->b_size, GFP_NOFS);
-               if (!committed_data) {
-                       printk(KERN_ERR "%s: No memory for committed data\n",
-                               __func__);
-                       err = -ENOMEM;
-                       goto out;
-               }
-       }
+       if (!jh->b_committed_data)
+               committed_data = jbd2_alloc(jh2bh(jh)->b_size,
+                                           GFP_NOFS|__GFP_NOFAIL);
 
        jbd_lock_bh_state(bh);
        if (!jh->b_committed_data) {