projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
drm/radeon: clean up fujitsu quirks
[firefly-linux-kernel-4.4.55.git]
/
mm
/
zswap.c
diff --git
a/mm/zswap.c
b/mm/zswap.c
index 025f8dc723dedf60da7d2d9d580ac208e75cd8f6..bf14508afd64573d8310a5a3e12b99b629fc8c02 100644
(file)
--- a/
mm/zswap.c
+++ b/
mm/zswap.c
@@
-541,6
+541,7
@@
static struct zswap_pool *zswap_pool_last_get(void)
return last;
}
return last;
}
+/* type and compressor must be null-terminated */
static struct zswap_pool *zswap_pool_find_get(char *type, char *compressor)
{
struct zswap_pool *pool;
static struct zswap_pool *zswap_pool_find_get(char *type, char *compressor)
{
struct zswap_pool *pool;
@@
-548,10
+549,9
@@
static struct zswap_pool *zswap_pool_find_get(char *type, char *compressor)
assert_spin_locked(&zswap_pools_lock);
list_for_each_entry_rcu(pool, &zswap_pools, list) {
assert_spin_locked(&zswap_pools_lock);
list_for_each_entry_rcu(pool, &zswap_pools, list) {
- if (str
ncmp(pool->tfm_name, compressor, sizeof(pool->tfm_name)
))
+ if (str
cmp(pool->tfm_name, compressor
))
continue;
continue;
- if (strncmp(zpool_get_type(pool->zpool), type,
- sizeof(zswap_zpool_type)))
+ if (strcmp(zpool_get_type(pool->zpool), type))
continue;
/* if we can't get it, it's about to be destroyed */
if (!zswap_pool_get(pool))
continue;
/* if we can't get it, it's about to be destroyed */
if (!zswap_pool_get(pool))