[Cluster-devel] [PATCH] libgfs2: Zero de_inum.no_addr when deleting dirents
Andrew Price
anprice at redhat.com
Thu Jun 5 10:40:30 UTC 2014
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 <anprice at redhat.com>
---
gfs2/libgfs2/fs_ops.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/gfs2/libgfs2/fs_ops.c b/gfs2/libgfs2/fs_ops.c
index fdd4438..015b974 100644
--- a/gfs2/libgfs2/fs_ops.c
+++ b/gfs2/libgfs2/fs_ops.c
@@ -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;
}
--
1.9.3
More information about the Cluster-devel
mailing list