summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2015-08-21 01:41:04 -0800
committerKent Overstreet <kent.overstreet@gmail.com>2016-10-07 12:33:03 -0800
commitfd72e69264544fd866d7bd6d0fcca3bb088c170c (patch)
tree208e1b933b251b3c4277b733ec994120dd42e495
parent4ab566d91d51cc809abc7270f1dccf64869e7348 (diff)
bcache: kill SHOW_LOCKED()
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
-rw-r--r--drivers/md/bcache/sysfs.c9
-rw-r--r--drivers/md/bcache/sysfs.h10
2 files changed, 3 insertions, 16 deletions
diff --git a/drivers/md/bcache/sysfs.c b/drivers/md/bcache/sysfs.c
index 8d08a442d1a3..b252396668b7 100644
--- a/drivers/md/bcache/sysfs.c
+++ b/drivers/md/bcache/sysfs.c
@@ -190,7 +190,7 @@ static struct attribute sysfs_state_rw = {
.mode = S_IRUGO|S_IWUSR
};
-SHOW(__bch_cached_dev)
+SHOW(bch_cached_dev)
{
struct cached_dev *dc = container_of(kobj, struct cached_dev,
disk.kobj);
@@ -235,7 +235,6 @@ SHOW(__bch_cached_dev)
#undef var
return 0;
}
-SHOW_LOCKED(bch_cached_dev)
STORE(__cached_dev)
{
@@ -540,7 +539,7 @@ static unsigned bch_average_key_size(struct cache_set *c)
: 0;
}
-SHOW(__bch_cache_set)
+SHOW(bch_cache_set)
{
struct cache_set *c = container_of(kobj, struct cache_set, kobj);
@@ -641,7 +640,6 @@ SHOW(__bch_cache_set)
return 0;
}
-SHOW_LOCKED(bch_cache_set)
STORE(__bch_cache_set)
{
@@ -1043,7 +1041,7 @@ static ssize_t show_reserve_stats(struct cache *ca, char *buf)
return ret;
}
-SHOW(__bch_cache)
+SHOW(bch_cache)
{
struct cache *ca = container_of(kobj, struct cache, kobj);
struct bucket_stats stats = bucket_stats_read(ca);
@@ -1108,7 +1106,6 @@ SHOW(__bch_cache)
return 0;
}
-SHOW_LOCKED(bch_cache)
STORE(__bch_cache)
{
diff --git a/drivers/md/bcache/sysfs.h b/drivers/md/bcache/sysfs.h
index bfb25afd1499..4da5f451d286 100644
--- a/drivers/md/bcache/sysfs.h
+++ b/drivers/md/bcache/sysfs.h
@@ -21,16 +21,6 @@ static ssize_t fn ## _show(struct kobject *kobj, struct attribute *attr,\
static ssize_t fn ## _store(struct kobject *kobj, struct attribute *attr,\
const char *buf, size_t size) \
-#define SHOW_LOCKED(fn) \
-SHOW(fn) \
-{ \
- ssize_t ret; \
- mutex_lock(&bch_register_lock); \
- ret = __ ## fn ## _show(kobj, attr, buf); \
- mutex_unlock(&bch_register_lock); \
- return ret; \
-}
-
#define STORE_LOCKED(fn) \
STORE(fn) \
{ \