aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-08-22 10:43:00 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2013-08-22 10:43:00 -0700
commitee7075d45f57f90a42e61e016562ce8065668201 (patch)
treed0204e0b40921edbcf6c0fbcfe2c7439aa7d7323 /drivers
parentx86 get_unmapped_area: Access mmap_legacy_base through mm_struct member (diff)
parentdm cache: avoid conflicting remove_mapping() in mq policy (diff)
downloadlinux-dev-ee7075d45f57f90a42e61e016562ce8065668201.tar.xz
linux-dev-ee7075d45f57f90a42e61e016562ce8065668201.zip
Merge tag 'dm-3.11-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm
Pull device mapper fix from Mike Snitzer: "A patch to fix dm-cache-policy-mq's remove_mapping() conflict with sparc32" * tag 'dm-3.11-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: dm cache: avoid conflicting remove_mapping() in mq policy
Diffstat (limited to 'drivers')
-rw-r--r--drivers/md/dm-cache-policy-mq.c16
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:
return r;
}
-static void remove_mapping(struct mq_policy *mq, dm_oblock_t oblock)
+static void mq_remove_mapping(struct dm_cache_policy *p, dm_oblock_t oblock)
{
- struct entry *e = hash_lookup(mq, oblock);
+ struct mq_policy *mq = to_mq_policy(p);
+ struct entry *e;
+
+ mutex_lock(&mq->lock);
+
+ e = hash_lookup(mq, oblock);
BUG_ON(!e || !e->in_cache);
del(mq, e);
e->in_cache = false;
push(mq, e);
-}
-static void mq_remove_mapping(struct dm_cache_policy *p, dm_oblock_t oblock)
-{
- struct mq_policy *mq = to_mq_policy(p);
-
- mutex_lock(&mq->lock);
- remove_mapping(mq, oblock);
mutex_unlock(&mq->lock);
}