[PATCH] fsdax: dax_unshare_iter() should return a valid length

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The copy_mc_to_kernel() will return 0 if it executed successfully.
Then the return value should be set to the length it copied.

Fixes: d984648e428b ("fsdax,xfs: port unshare to fsdax")
Signed-off-by: Shiyang Ruan <ruansy.fnst@xxxxxxxxxxx>
---
 fs/dax.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/dax.c b/fs/dax.c
index c48a3a93ab29..a5b4deb5def3 100644
--- a/fs/dax.c
+++ b/fs/dax.c
@@ -1274,6 +1274,7 @@ static s64 dax_unshare_iter(struct iomap_iter *iter)
 	ret = copy_mc_to_kernel(daddr, saddr, length);
 	if (ret)
 		ret = -EIO;
+	ret = length;
 
 out_unlock:
 	dax_read_unlock(id);
-- 
2.39.1




[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux