[RHEL7,COMMIT] fs/fuse kio_pcs: fix map leak in pcs_mapping_truncate()

Submitted by Konstantin Khorenko on Oct. 31, 2018, 1:02 p.m.

Details

Message ID 201810311302.w9VD2oCm023356@finist-ce7.sw.ru
State New
Series "fs/fuse kio_pcs: fix map leak in pcs_mapping_truncate()"
Headers show

Commit Message

Konstantin Khorenko Oct. 31, 2018, 1:02 p.m.
The commit is pushed to "branch-rh7-3.10.0-862.14.4.vz7.72.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-862.14.4.vz7.72.15
------>
commit 384e1aef83043e3d2edc76bf7a293b18db8c5748
Author: Pavel Butsykin <pbutsykin@virtuozzo.com>
Date:   Wed Oct 31 16:02:49 2018 +0300

    fs/fuse kio_pcs: fix map leak in pcs_mapping_truncate()
    
    Signed-off-by: Pavel Butsykin <pbutsykin@virtuozzo.com>
    Reviewed-by: Kirill Tkhai <ktkhai@virtuozzo.com>
    
    =====================
    Patchset description:
    
    FUSE KIO: Mapping truncate fixes
    
    https://jira.sw.ru/browse/PSBM-89539
---
 fs/fuse/kio/pcs/pcs_map.c | 1 +
 1 file changed, 1 insertion(+)

Patch hide | download patch | download mbox

diff --git a/fs/fuse/kio/pcs/pcs_map.c b/fs/fuse/kio/pcs/pcs_map.c
index 81a1a2a62ca4..01cbf95f7ab7 100644
--- a/fs/fuse/kio/pcs/pcs_map.c
+++ b/fs/fuse/kio/pcs/pcs_map.c
@@ -2494,6 +2494,7 @@  noinline void pcs_mapping_truncate(struct pcs_int_request *ireq, u64 old_size)
 	if (m && map_chunk_end(m) == offset) {
 		map_truncate_tail(&di->mapping, offset);
 		ireq_complete(ireq);
+		pcs_map_put(m);
 		return;
 	}