]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
f2fs: read page index before freeing
authorPan Bian <bianpan2016@163.com>
Thu, 22 Nov 2018 10:58:46 +0000 (18:58 +0800)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 14 Aug 2019 09:18:49 +0000 (11:18 +0200)
commit94cac7fa977df53930eea5262ba6d2c2a281d744
treeeedeb1a432f1b48cfaa7772c9d855fc2ff5ddd4d
parentbc668177e77e80f26d340ea12230e51d41a08a94
f2fs: read page index before freeing

BugLink: https://bugs.launchpad.net/bugs/1837257
commit 0ea295dd853e0879a9a30ab61f923c26be35b902 upstream.

The function truncate_node frees the page with f2fs_put_page. However,
the page index is read after that. So, the patch reads the index before
freeing the page.

Fixes: bf39c00a9a7f ("f2fs: drop obsolete node page when it is truncated")
Cc: <stable@vger.kernel.org>
Signed-off-by: Pan Bian <bianpan2016@163.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
fs/f2fs/node.c