Message ID | 20200410213216.yyMwFshfU%akpm@linux-foundation.org |
---|---|
State | New |
Headers | show |
Series | [01/35] hfsplus: fix crash and filesystem corruption when deleting files | expand |
--- a/fs/hfsplus/attributes.c~hfsplus-fix-crash-and-filesystem-corruption-when-deleting-files +++ a/fs/hfsplus/attributes.c @@ -292,6 +292,10 @@ static int __hfsplus_delete_attr(struct return -ENOENT; } + /* Avoid btree corruption */ + hfs_bnode_read(fd->bnode, fd->search_key, + fd->keyoffset, fd->keylength); + err = hfs_brec_remove(fd); if (err) return err;