Commit f9a61300 authored by Maurizio Lombardi's avatar Maurizio Lombardi Committed by Juerg Haefliger

ext4: missing unlock/put_page() in ext4_try_to_write_inline_data()

BugLink: https://bugs.launchpad.net/bugs/1811647

commit 132d00be upstream.

In case of error, ext4_try_to_write_inline_data() should unlock
and release the page it holds.

Fixes: f19d5870 ("ext4: add normal write support for inline data")
Cc: stable@kernel.org # 3.8
Signed-off-by: default avatarMaurizio Lombardi <mlombard@redhat.com>
Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarJuerg Haefliger <juergh@canonical.com>
Signed-off-by: default avatarStefan Bader <stefan.bader@canonical.com>
parent 5ca43d56
...@@ -701,8 +701,11 @@ int ext4_try_to_write_inline_data(struct address_space *mapping, ...@@ -701,8 +701,11 @@ int ext4_try_to_write_inline_data(struct address_space *mapping,
if (!PageUptodate(page)) { if (!PageUptodate(page)) {
ret = ext4_read_inline_page(inode, page); ret = ext4_read_inline_page(inode, page);
if (ret < 0) if (ret < 0) {
unlock_page(page);
put_page(page);
goto out_up_read; goto out_up_read;
}
} }
ret = 1; ret = 1;
......
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