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

Peter Zijlstra
2020-05-20T10:56:46Z

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.