Skip to contentSkip to conversation

fsdax-dax_unshare_iter-should-return-a-valid-length.patch removed from -mm tree

merged mm-hotfixes-stable Andrew Morton 1 participant 1 message Feb 4, 2023

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: fsdax: dax_unshare_iter() should return a valid length
has been removed from the -mm tree. Its filename was
fsdax-dax_unshare_iter-should-return-a-valid-length.patch

This patch was dropped because it was merged into the mm-hotfixes-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Shiyang Ruan <[email protected]>
Subject: fsdax: dax_unshare_iter() should return a valid length
Date: Thu, 2 Feb 2023 12:33:47 +0000

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

[[email protected]: don't mess up `ret', per Matthew]
Fixes d984648e428b ("fsdax,xfs: port unshare to fsdax")
Cc Darrick J. Wong <[email protected]>
Cc Alistair Popple <[email protected]>
Cc Dan Williams <[email protected]>
Cc Dave Chinner <[email protected]>
Cc Jason Gunthorpe <[email protected]>
Cc John Hubbard <[email protected]>
Cc Matthew Wilcox <[email protected]>

---

fs/dax.c renamed from fs/dax.c~fsdax-dax_unshare_iter-should-return-a-valid-length +3 -2
@@ -1271,8 +1271,9 @@ static s64 dax_unshare_iter(struct iomap
 	if (ret < 0)
 		goto out_unlock;
 
-	ret = copy_mc_to_kernel(daddr, saddr, length);
-	if (ret)
+	if (copy_mc_to_kernel(daddr, saddr, length) == 0)
+		ret = length;
+	else
 		ret = -EIO;
 
 out_unlock:

_

Patches currently in -mm which might be from [email protected] are