[Devel] [PATCH RHEL7 COMMIT] fs/fuse kio_pcs: fix double unlock of m->lock in pcs_map_get_locked()

Konstantin Khorenko khorenko at virtuozzo.com
Fri Jun 15 15:01:15 MSK 2018


The commit is pushed to "branch-rh7-3.10.0-693.21.1.vz7.50.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-693.21.1.vz7.50.9
------>
commit 1a466678a18e44463b3b1161bc6fe1e91ed9b180
Author: Pavel Butsykin <pbutsykin at virtuozzo.com>
Date:   Fri Jun 15 15:01:14 2018 +0300

    fs/fuse kio_pcs: fix double unlock of m->lock in pcs_map_get_locked()
    
    The callers don't expect that m->lock can be released inside pcs_map_get_locked().
    Let's fix it.
    
    Signed-off-by: Pavel Butsykin <pbutsykin at virtuozzo.com>
    Reviewed-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
 fs/fuse/kio/pcs/pcs_map.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/fs/fuse/kio/pcs/pcs_map.h b/fs/fuse/kio/pcs/pcs_map.h
index bc6874a2ebc2..bc36983a7355 100644
--- a/fs/fuse/kio/pcs/pcs_map.h
+++ b/fs/fuse/kio/pcs/pcs_map.h
@@ -240,7 +240,6 @@ static inline bool pcs_map_get_locked(struct pcs_map_entry *m)
 	BUG_ON(atomic_read(&m->__refcnt) < 0);
 
 	if (m->state & PCS_MAP_DEAD) {
-		spin_unlock(&m->lock);
 		return 0;
 	}
 


More information about the Devel mailing list