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

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

Details

Message ID 201810311302.w9VD2nZr023254@finist-ce7.sw.ru
State New
Series "fs/fuse kio_pcs: fix condition for map resolving 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 4f718bee3ca0904895fc5b06b9fc897486af592a
Author: Pavel Butsykin <pbutsykin@virtuozzo.com>
Date:   Wed Oct 31 16:02:48 2018 +0300

    fs/fuse kio_pcs: fix condition for map resolving in pcs_mapping_truncate()
    
    We need to resolve map if it's valid, and not otherwise.
    
    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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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 97b85a2c1b79..73808dffb8df 100644
--- a/fs/fuse/kio/pcs/pcs_map.c
+++ b/fs/fuse/kio/pcs/pcs_map.c
@@ -2496,7 +2496,7 @@  noinline void pcs_mapping_truncate(struct pcs_int_request *ireq, u64 old_size)
 		queue = 1;
 	else {
 		spin_lock(&m->lock);
-		if (valid_for_truncate(m, ireq))
+		if (!valid_for_truncate(m, ireq))
 			queue = 1;
 		spin_unlock(&m->lock);
 	}