fuse: add locking to max_background and congestion_threshold changes
authorKirill Tkhai <ktkhai@virtuozzo.com>
Mon, 27 Aug 2018 15:29:37 +0000 (18:29 +0300)
committerMiklos Szeredi <mszeredi@redhat.com>
Fri, 28 Sep 2018 14:43:22 +0000 (16:43 +0200)
commit2b30a533148af4f3865c0dcd619ad93ab3f4ba52
treefd25fe80e8ff83649d05d6eda7328447909ba628
parent2a23f2b8adbe4bd584f936f7ac17a99750eed9d7
fuse: add locking to max_background and congestion_threshold changes

Functions sequences like request_end()->flush_bg_queue() require that
max_background and congestion_threshold are constant during their
execution. Otherwise, checks like

if (fc->num_background == fc->max_background)

made in different time may behave not like expected.

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/fuse/control.c