mirror of
https://github.com/torvalds/linux.git
synced 2025-01-01 07:42:07 +00:00
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: Eric Sandeen <sandeen@redhat.com> Acked-by: Mingming Cao <cmm@us.ibm.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
This commit is contained in:
parent
e9e34f4e8f
commit
d5a0d4f732
@ -2280,8 +2280,11 @@ retry:
|
||||
}
|
||||
|
||||
page = __grab_cache_page(mapping, index);
|
||||
if (!page)
|
||||
return -ENOMEM;
|
||||
if (!page) {
|
||||
ext4_journal_stop(handle);
|
||||
ret = -ENOMEM;
|
||||
goto out;
|
||||
}
|
||||
*pagep = page;
|
||||
|
||||
ret = block_write_begin(file, mapping, pos, len, flags, pagep, fsdata,
|
||||
|
Loading…
Reference in New Issue
Block a user