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

Submitted by Konstantin Khorenko on June 15, 2018, 12:01 p.m.

Details

Message ID 201806151201.w5FC1Foe010007@finist_ce7.work
State New
Series "fs/fuse kio_pcs: fix double unlock of m->lock in pcs_map_get_locked()"
Headers show

Commit Message

Konstantin Khorenko June 15, 2018, 12:01 p.m.
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@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@virtuozzo.com>
    Reviewed-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
 fs/fuse/kio/pcs/pcs_map.h | 1 -
 1 file changed, 1 deletion(-)

Patch hide | download patch | download mbox

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;
 	}