hc
2024-05-10 9999e48639b3cecb08ffb37358bcba3b48161b29
kernel/drivers/block/zram/zcomp.h
....@@ -1,16 +1,15 @@
1
+/* SPDX-License-Identifier: GPL-2.0-or-later */
12 /*
23 * Copyright (C) 2014 Sergey Senozhatsky.
3
- *
4
- * This program is free software; you can redistribute it and/or
5
- * modify it under the terms of the GNU General Public License
6
- * as published by the Free Software Foundation; either version
7
- * 2 of the License, or (at your option) any later version.
84 */
95
106 #ifndef _ZCOMP_H_
117 #define _ZCOMP_H_
8
+#include <linux/local_lock.h>
129
1310 struct zcomp_strm {
11
+ /* The members ->buffer and ->tfm are protected by ->lock. */
12
+ local_lock_t lock;
1413 /* compression/decompression buffer */
1514 void *buffer;
1615 struct crypto_comp *tfm;
....@@ -18,7 +17,7 @@
1817
1918 /* dynamic per-device compression frontend */
2019 struct zcomp {
21
- struct zcomp_strm * __percpu *stream;
20
+ struct zcomp_strm __percpu *stream;
2221 const char *name;
2322 struct hlist_node node;
2423 };