Re: [PATCH 5/8] squashfs: make use of local lock in multi_cpu decompressor

From: Peter Zijlstra
Date: Wed May 20 2020 - 06:56:47 EST


On Tue, May 19, 2020 at 10:19:09PM +0200, Sebastian Andrzej Siewior wrote:
> diff --git a/fs/squashfs/decompressor_multi_percpu.c b/fs/squashfs/decompressor_multi_percpu.c
> index 2a2a2d106440e..8a77a2741c176 100644
> --- a/fs/squashfs/decompressor_multi_percpu.c
> +++ b/fs/squashfs/decompressor_multi_percpu.c
> @@ -8,6 +8,7 @@
> #include <linux/slab.h>
> #include <linux/percpu.h>
> #include <linux/buffer_head.h>
> +#include <linux/locallock.h>
>
> #include "squashfs_fs.h"
> #include "squashfs_fs_sb.h"
> @@ -23,6 +24,8 @@ struct squashfs_stream {
> void *stream;
> };
>
> +static DEFINE_LOCAL_LOCK(stream_lock);

As per the others, you can stick it in struct squashfs_stream.