[2/2] ploop: Make PLOOP_IOC_FREEBLKS always return 0

Submitted by Kirill Tkhai on April 10, 2019, 9:19 a.m.

Details

Message ID 155488794099.22760.2057338858469149865.stgit@localhost.localdomain
State New
Series "Series without cover letter"
Headers show

Commit Message

Kirill Tkhai April 10, 2019, 9:19 a.m.
This passes balloon file blocks to kernel.
New native discard scheme should send discard
in these blocks. Make it return 0 for a while
to make tests happy (later, it will be needed
to implement cycle, sending discards in the blocks).

Note, that the ioctl won't return any data
to userspace anymore, since in new scheme
it's not needed to call PLOOP_IOC_RELOCBLKS
after that (everything should be made
in PLOOP_IOC_FREEBLKS).

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
 drivers/block/ploop/dev.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/drivers/block/ploop/dev.c b/drivers/block/ploop/dev.c
index 949617d5b14f..37685356d08a 100644
--- a/drivers/block/ploop/dev.c
+++ b/drivers/block/ploop/dev.c
@@ -4555,7 +4555,7 @@  static int ploop_freeblks_ioc(struct ploop_device *plo, unsigned long arg)
 	int i;
 	int rc = 0;
 
-	return -EINVAL;
+	return 0;
 
 	if (list_empty(&plo->map.delta_list))
 		return -ENOENT;