Re: [PATCH] hfs: fix not erasing deleted b-tree node issue

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

 



Hi Johannes,

On Tue, 2025-04-29 at 06:05 +0000, Johannes Thumshirn wrote:
> On 29.04.25 03:16, Viacheslav Dubeyko wrote:
> > Signed-off-by: Viacheslav Dubeyko <slava@xxxxxxxxxxx>
> > ---
> >   fs/hfs/bnode.c | 2 ++
> >   1 file changed, 2 insertions(+)
> > 
> > diff --git a/fs/hfs/bnode.c b/fs/hfs/bnode.c
> > index cb823a8a6ba9..c5eae7c418a1 100644
> > --- a/fs/hfs/bnode.c
> > +++ b/fs/hfs/bnode.c
> > @@ -219,6 +219,8 @@ void hfs_bnode_unlink(struct hfs_bnode *node)
> >   		tree->root = 0;
> >   		tree->depth = 0;
> >   	}
> > +
> > +	hfs_bnode_clear(node, 0, tree->node_size);
> >   	set_bit(HFS_BNODE_DELETED, &node->flags);
> >   }
> >   
> 
> I've just checked HFS+ code and hfs_bnode_unlink() in fs/hfsplus/bnode.c 
> is a copy of the fs/hfs/bnode.c one (maybe most of the file is so 
> there's room for unification?). So I think the fix is needed there as well.

Good catch. I assume we should be able to reproduce the above error with xfstests
with HFS+ as well and the same fix should address the bug accordingly.

I haven't created my xfstests setup yet, so hopefully someone will beat me to this.

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913





[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