summaryrefslogtreecommitdiffstats
path: root/drivers/md/dm.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2013-02-28 18:53:01 +0100
committerArnd Bergmann <arnd@arndb.de>2013-02-28 18:53:01 +0100
commit168268a225d24da3768a88c1029fb3014b0837ca (patch)
treeafde019a1ac79366df0b96a2fcc8ba50bc5298fa /drivers/md/dm.c
parent04ee16bdf486061147c608410c2c9181352aaa3a (diff)
parent6f1989bc982bc176b0d63e028e9b7f23ae1b4583 (diff)
downloadblackbird-op-linux-168268a225d24da3768a88c1029fb3014b0837ca.tar.gz
blackbird-op-linux-168268a225d24da3768a88c1029fb3014b0837ca.zip
Merge 'mmc/upstream' into late/mvebu2
These patches from the mmc tree were merged into v3.9 already and the later mvebu patches depend on them. Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'drivers/md/dm.c')
-rw-r--r--drivers/md/dm.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index c72e4d5a9617..314a0e2faf79 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -1188,6 +1188,7 @@ static int __clone_and_map_changing_extent_only(struct clone_info *ci,
{
struct dm_target *ti;
sector_t len;
+ unsigned num_requests;
do {
ti = dm_table_find_target(ci->map, ci->sector);
@@ -1200,7 +1201,8 @@ static int __clone_and_map_changing_extent_only(struct clone_info *ci,
* reconfiguration might also have changed that since the
* check was performed.
*/
- if (!get_num_requests || !get_num_requests(ti))
+ num_requests = get_num_requests ? get_num_requests(ti) : 0;
+ if (!num_requests)
return -EOPNOTSUPP;
if (is_split_required && !is_split_required(ti))
@@ -1208,7 +1210,7 @@ static int __clone_and_map_changing_extent_only(struct clone_info *ci,
else
len = min(ci->sector_count, max_io_len(ci->sector, ti));
- __issue_target_requests(ci, ti, ti->num_discard_requests, len);
+ __issue_target_requests(ci, ti, num_requests, len);
ci->sector += len;
} while (ci->sector_count -= len);
OpenPOWER on IntegriCloud