]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
ceph: fix memory leak in ceph_readdir when note_last_dentry returns error
authorXiubo Li <xiubli@redhat.com>
Sat, 5 Mar 2022 11:52:59 +0000 (19:52 +0800)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 20 May 2022 12:40:52 +0000 (14:40 +0200)
commitae928bcc2f15b2c78744b8b514f8a8b5e9992eff
treeac330aa458647c36213467a70fc568e00453050e
parentb5f96bd1b14425e49129cf0f799f53e4e946ebbe
ceph: fix memory leak in ceph_readdir when note_last_dentry returns error

BugLink: https://bugs.launchpad.net/bugs/1969107
[ Upstream commit f639d9867eea647005dc824e0e24f39ffc50d4e4 ]

Reset the last_readdir at the same time, and add a comment explaining
why we don't free last_readdir when dir_emit returns false.

Signed-off-by: Xiubo Li <xiubli@redhat.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit 2fe82d3254029ef9ec4e7be890125d5ef4f537de)
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
fs/ceph/dir.c