diff options
author | Maurizio Lombardi <mlombard@redhat.com> | 2018-12-04 00:06:53 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2018-12-04 00:06:53 -0500 |
commit | 132d00becb31e88469334e1e62751c81345280e0 (patch) | |
tree | d9c9ce5fd0e3cfe49b3fa9d068ce2a1215e37985 /fs | |
parent | 61157b24e60fb3cd1f85f2c76a7b1d628f970144 (diff) |
ext4: missing unlock/put_page() in ext4_try_to_write_inline_data()
In case of error, ext4_try_to_write_inline_data() should unlock
and release the page it holds.
Fixes: f19d5870cbf7 ("ext4: add normal write support for inline data")
Cc: stable@kernel.org # 3.8
Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ext4/inline.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/ext4/inline.c b/fs/ext4/inline.c index 9c4bac18cc6c..27373d88b5f0 100644 --- a/fs/ext4/inline.c +++ b/fs/ext4/inline.c | |||
@@ -705,8 +705,11 @@ int ext4_try_to_write_inline_data(struct address_space *mapping, | |||
705 | 705 | ||
706 | if (!PageUptodate(page)) { | 706 | if (!PageUptodate(page)) { |
707 | ret = ext4_read_inline_page(inode, page); | 707 | ret = ext4_read_inline_page(inode, page); |
708 | if (ret < 0) | 708 | if (ret < 0) { |
709 | unlock_page(page); | ||
710 | put_page(page); | ||
709 | goto out_up_read; | 711 | goto out_up_read; |
712 | } | ||
710 | } | 713 | } |
711 | 714 | ||
712 | ret = 1; | 715 | ret = 1; |