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

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

 



Andrew Morton wrote:
> On Thu, 2 Feb 2023 23:01:23 +0000 Matthew Wilcox <willy@xxxxxxxxxxxxx> wrote:
> 
> > On Thu, Feb 02, 2023 at 12:33:47PM +0000, Shiyang Ruan wrote:
> > > 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>
[..]
> 
> Clearer, methinks:
> 
> 	if (copy_mc_to_kernel(daddr, saddr, length) == 0)
> 		ret = length;
> 	else
> 		ret = -EIO;
> 

That looks good to me.



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux