]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commit
dm table: fix queue_limit checking device iterator
authorMikulas Patocka <mpatocka@redhat.com>
Fri, 4 Sep 2009 19:40:22 +0000 (20:40 +0100)
committerAlasdair G Kergon <agk@redhat.com>
Fri, 4 Sep 2009 19:40:22 +0000 (20:40 +0100)
commitf6a1ed10864b7540fa758bbccf3433fe17070329
treee0b8f1c02f0527e0870dee2977f311695856f8a5
parent8811f46c1f9386fc7017150de9d52359e5b1826e
dm table: fix queue_limit checking device iterator

The logic to check for valid device areas is inverted relative to proper
use with iterate_devices.

The iterate_devices method calls its callback for every underlying
device in the target.  If any callback returns non-zero, iterate_devices
exits immediately.  But the callback device_area_is_valid() returns 0 on
error and 1 on success.  The overall effect without is that an error is
issued only if every device is invalid.

This patch renames device_area_is_valid to device_area_is_invalid and
inverts the logic so that one invalid device is sufficient to raise
an error.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
drivers/md/dm-table.c