Merge tag 'dm-4.6-fix-2' of git://git.kernel.org/pub/scm/linux/kernel/git/device...
authorLinus Torvalds <torvalds@linux-foundation.org>
Sun, 17 Apr 2016 19:30:06 +0000 (12:30 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 17 Apr 2016 19:30:06 +0000 (12:30 -0700)
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

drivers/md/dm-cache-metadata.c

index 65ce6985f87a0a940aed6bf6bc9a70663a84c9fa..3970cda10080988887bfa07329241d94afd1b883 100644 (file)
@@ -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;
This page took 0.024993 seconds and 5 git commands to generate.