Commit d5a0d4f7 authored by Eric Sandeen's avatar Eric Sandeen Committed by Theodore Ts'o

ext4: fix ext4_da_write_begin error path

ext4_da_write_begin needs to call journal_stop before returning,
if the page allocation fails.
Signed-off-by: default avatarEric Sandeen <sandeen@redhat.com>
Acked-by: default avatarMingming Cao <cmm@us.ibm.com>
Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
parent e9e34f4e
...@@ -2280,8 +2280,11 @@ retry: ...@@ -2280,8 +2280,11 @@ retry:
} }
page = __grab_cache_page(mapping, index); page = __grab_cache_page(mapping, index);
if (!page) if (!page) {
return -ENOMEM; ext4_journal_stop(handle);
ret = -ENOMEM;
goto out;
}
*pagep = page; *pagep = page;
ret = block_write_begin(file, mapping, pos, len, flags, pagep, fsdata, ret = block_write_begin(file, mapping, pos, len, flags, pagep, fsdata,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment