Skip to content

Commit

Permalink
Merge tag 'dm-3.11-fixes' of git://git.kernel.org/pub/scm/linux/kerne…
Browse files Browse the repository at this point in the history
…l/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
  • Loading branch information
Linus Torvalds committed Aug 22, 2013
2 parents 41aacc1 + b936bf8 commit ee7075d
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions drivers/md/dm-cache-policy-mq.c
Original file line number Diff line number Diff line change
Expand Up @@ -959,23 +959,21 @@ static int mq_walk_mappings(struct dm_cache_policy *p, policy_walk_fn fn,
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);
}

Expand Down

0 comments on commit ee7075d

Please sign in to comment.