[SCSI] seperate max_sectors from max_hw_sectors
[linux-3.10.git] / drivers / md / dm-table.c
index a5a4c0ed8a143fb274d13dd3d9e56500d6fac098..a6f2dc66c3db12b09606218e1595e147b20c8a57 100644 (file)
@@ -638,7 +638,7 @@ int dm_split_args(int *argc, char ***argvp, char *input)
 static void check_for_valid_limits(struct io_restrictions *rs)
 {
        if (!rs->max_sectors)
-               rs->max_sectors = MAX_SECTORS;
+               rs->max_sectors = SAFE_MAX_SECTORS;
        if (!rs->max_phys_segments)
                rs->max_phys_segments = MAX_PHYS_SEGMENTS;
        if (!rs->max_hw_segments)
@@ -869,11 +869,17 @@ static void suspend_targets(struct dm_table *t, unsigned postsuspend)
 
 void dm_table_presuspend_targets(struct dm_table *t)
 {
+       if (!t)
+               return;
+
        return suspend_targets(t, 0);
 }
 
 void dm_table_postsuspend_targets(struct dm_table *t)
 {
+       if (!t)
+               return;
+
        return suspend_targets(t, 1);
 }