Skip to content

Commit

Permalink
Merge tag 'dm-4.6-fix-2' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/git/device-mapper/linux-dm

Pull device mapper fix from Mike Snitzer:
 "Fix for earlier 4.6-rc4 stable@ commit that introduced improper use of
  write lock in cmd_read_lock() -- due to cut-n-paste gone awry (and
  sparse didn't catch it)"

* tag 'dm-4.6-fix-2' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm:
  dm cache metadata: fix cmd_read_lock() acquiring write lock
  • Loading branch information
Linus Torvalds committed Apr 17, 2016
2 parents b9f5dba + 6545b60 commit 9d090d0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/md/dm-cache-metadata.c
Original file line number Diff line number Diff line change
Expand Up @@ -894,9 +894,9 @@ static bool cmd_write_lock(struct dm_cache_metadata *cmd)

static bool cmd_read_lock(struct dm_cache_metadata *cmd)
{
down_write(&cmd->root_lock);
down_read(&cmd->root_lock);
if (cmd->fail_io) {
up_write(&cmd->root_lock);
up_read(&cmd->root_lock);
return false;
}
return true;
Expand Down

0 comments on commit 9d090d0

Please sign in to comment.