libgfs2: Zero de_inum.no_addr when deleting dirents
PATCH 1/1 libgfs2: Zero de_inum.no_addr when deleting dirents
libgfs2 left deleted dirents in leaf blocks which have been split, which is fine, but it only zeroed the no_formal_ino field, causing gfs2_edit to display deleted dirents when printing leaf blocks. Zero the no_addr field too, as the kernel code does.
Signed-off-by Andrew Price <[email protected]>
--- gfs2/libgfs2/fs_ops.c | 1 + 1 file changed, 1 insertion(+)
gfs2/libgfs2/fs_ops.c +1 -0
@@ -826,6 +826,7 @@ void dirent2_del(struct gfs2_inode *dip, struct gfs2_buffer_head *bh, dip->i_di.di_entries--; }if (!prev) { + cur->de_inum.no_addr =0 ; cur->de_inum.no_formal_ino =0 ;return ; }
Signature · 1 line
1.9.3