diff options
author | Geert Uytterhoeven <geert@linux-m68k.org> | 2013-07-26 03:57:31 -0400 |
---|---|---|
committer | Mike Snitzer <snitzer@redhat.com> | 2013-08-16 15:56:51 -0400 |
commit | b936bf8b785f0fbe083d203049e4da1c56ec788f (patch) | |
tree | d9e14b5d43f55309360a9e73d2b7f25b0c60e54a | |
parent | d4e4ab86bcba5a72779c43dc1459f71fea3d89c8 (diff) |
dm cache: avoid conflicting remove_mapping() in mq policy
On sparc32, which includes <linux/swap.h> from <asm/pgtable_32.h>:
drivers/md/dm-cache-policy-mq.c:962:13: error: conflicting types for 'remove_mapping'
include/linux/swap.h:285:12: note: previous declaration of 'remove_mapping' was here
As mq_remove_mapping() already exists, and the local remove_mapping() is
used only once, inline it manually to avoid the conflict.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair Kergon <agk@redhat.com>
Acked-by: Joe Thornber <ejt@redhat.com>
-rw-r--r-- | drivers/md/dm-cache-policy-mq.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/md/dm-cache-policy-mq.c b/drivers/md/dm-cache-policy-mq.c index dc112a7137fe..4296155090b2 100644 --- a/drivers/md/dm-cache-policy-mq.c +++ b/drivers/md/dm-cache-policy-mq.c | |||
@@ -959,23 +959,21 @@ out: | |||
959 | return r; | 959 | return r; |
960 | } | 960 | } |
961 | 961 | ||
962 | static void remove_mapping(struct mq_policy *mq, dm_oblock_t oblock) | 962 | static void mq_remove_mapping(struct dm_cache_policy *p, dm_oblock_t oblock) |
963 | { | 963 | { |
964 | struct entry *e = hash_lookup(mq, oblock); | 964 | struct mq_policy *mq = to_mq_policy(p); |
965 | struct entry *e; | ||
966 | |||
967 | mutex_lock(&mq->lock); | ||
968 | |||
969 | e = hash_lookup(mq, oblock); | ||
965 | 970 | ||
966 | BUG_ON(!e || !e->in_cache); | 971 | BUG_ON(!e || !e->in_cache); |
967 | 972 | ||
968 | del(mq, e); | 973 | del(mq, e); |
969 | e->in_cache = false; | 974 | e->in_cache = false; |
970 | push(mq, e); | 975 | push(mq, e); |
971 | } | ||
972 | 976 | ||
973 | static void mq_remove_mapping(struct dm_cache_policy *p, dm_oblock_t oblock) | ||
974 | { | ||
975 | struct mq_policy *mq = to_mq_policy(p); | ||
976 | |||
977 | mutex_lock(&mq->lock); | ||
978 | remove_mapping(mq, oblock); | ||
979 | mutex_unlock(&mq->lock); | 977 | mutex_unlock(&mq->lock); |
980 | } | 978 | } |
981 | 979 | ||