[RHEL7,COMMIT] fuse kio: Add missed spin_lock into sync_timer_work()

Submitted by Konstantin Khorenko on June 25, 2018, 4:01 p.m.

Details

Message ID 201806251601.w5PG1mRP010886@finist_ce7.work
State New
Series "fuse kio: Add missed spin_lock into sync_timer_work()"
Headers show

Commit Message

Konstantin Khorenko June 25, 2018, 4: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.15
------>
commit b12af2c18a321afbf8d1df1b741631a272eaa407
Author: Kirill Tkhai <ktkhai@virtuozzo.com>
Date:   Mon Jun 25 19:01:48 2018 +0300

    fuse kio: Add missed spin_lock into sync_timer_work()
    
    Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
    Reviewed-by: Pavel Butsykin <pbutsykin@virtuozzo.com>
---
 fs/fuse/kio/pcs/pcs_map.c | 2 ++
 1 file changed, 2 insertions(+)

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 35833169f2f7..217644409528 100644
--- a/fs/fuse/kio/pcs/pcs_map.c
+++ b/fs/fuse/kio/pcs/pcs_map.c
@@ -3048,7 +3048,9 @@  static void sync_timer_work(struct work_struct *w)
 
 	err = prepare_map_flush_ireq(m, &sreq);
 	if (err) {
+		spin_lock(&m->lock);
 		map_sync_work_add(m, HZ);
+		spin_unlock(&m->lock);
 	} else {
 		if (sreq)
 			map_submit(m, sreq);