diff options
author | Maurizio Lombardi <mlombard@redhat.com> | 2018-12-04 08:06:53 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-01-09 19:14:49 +0300 |
commit | 92bb9b067bda14377d44c86ae5af06143e436245 (patch) | |
tree | 783b4a4e1f8a7f5bfad5114c7a5beec2389f5bfd /fs | |
parent | 34bba27d0399bee3cf65b030f2f43dde77d92248 (diff) | |
download | linux-92bb9b067bda14377d44c86ae5af06143e436245.tar.xz |
ext4: missing unlock/put_page() in ext4_try_to_write_inline_data()
commit 132d00becb31e88469334e1e62751c81345280e0 upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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 ac2e0516c16f..40a2d1a428c2 100644 --- a/fs/ext4/inline.c +++ b/fs/ext4/inline.c @@ -711,8 +711,11 @@ int ext4_try_to_write_inline_data(struct address_space *mapping, if (!PageUptodate(page)) { ret = ext4_read_inline_page(inode, page); - if (ret < 0) + if (ret < 0) { + unlock_page(page); + put_page(page); goto out_up_read; + } } ret = 1; |