aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-zero.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/dm-zero.c')
-rw-r--r--drivers/md/dm-zero.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/md/dm-zero.c b/drivers/md/dm-zero.c
index bbc97030c0c2..cc2b3cb81946 100644
--- a/drivers/md/dm-zero.c
+++ b/drivers/md/dm-zero.c
@@ -22,6 +22,11 @@ static int zero_ctr(struct dm_target *ti, unsigned int argc, char **argv)
return -EINVAL;
}
+ /*
+ * Silently drop discards, avoiding -EOPNOTSUPP.
+ */
+ ti->num_discard_requests = 1;
+
return 0;
}