zpool: remove the list of pools_head
Bugzilla: https://bugzilla.redhat.com/2120352
commit f44e1e697674335f837280d5e4485d1523206ea9
Author: Zhaoyu Liu <zackary.liu.pro@gmail.com>
Date: Fri Jan 14 14:09:19 2022 -0800
zpool: remove the list of pools_head
The list of pools_head is no longer needed because the caller has been
deleted in commit 479305fd71
("zpool: remove zpool_evict()").
Link: https://lkml.kernel.org/r/20211215163727.GA17196@pc
Signed-off-by: Zhaoyu Liu <zackary.liu.pro@gmail.com>
Cc: Dan Streetman <ddstreet@ieee.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Chris von Recklinghausen <crecklin@redhat.com>
This commit is contained in:
parent
53056b04fd
commit
677aff3bcf
12
mm/zpool.c
12
mm/zpool.c
|
@ -24,16 +24,11 @@ struct zpool {
|
|||
const struct zpool_ops *ops;
|
||||
bool evictable;
|
||||
bool can_sleep_mapped;
|
||||
|
||||
struct list_head list;
|
||||
};
|
||||
|
||||
static LIST_HEAD(drivers_head);
|
||||
static DEFINE_SPINLOCK(drivers_lock);
|
||||
|
||||
static LIST_HEAD(pools_head);
|
||||
static DEFINE_SPINLOCK(pools_lock);
|
||||
|
||||
/**
|
||||
* zpool_register_driver() - register a zpool implementation.
|
||||
* @driver: driver to register
|
||||
|
@ -195,10 +190,6 @@ struct zpool *zpool_create_pool(const char *type, const char *name, gfp_t gfp,
|
|||
|
||||
pr_debug("created pool type %s\n", type);
|
||||
|
||||
spin_lock(&pools_lock);
|
||||
list_add(&zpool->list, &pools_head);
|
||||
spin_unlock(&pools_lock);
|
||||
|
||||
return zpool;
|
||||
}
|
||||
|
||||
|
@ -217,9 +208,6 @@ void zpool_destroy_pool(struct zpool *zpool)
|
|||
{
|
||||
pr_debug("destroying pool type %s\n", zpool->driver->type);
|
||||
|
||||
spin_lock(&pools_lock);
|
||||
list_del(&zpool->list);
|
||||
spin_unlock(&pools_lock);
|
||||
zpool->driver->destroy(zpool->pool);
|
||||
zpool_put_driver(zpool->driver);
|
||||
kfree(zpool);
|
||||
|
|
Loading…
Reference in New Issue