* [Cluster-devel] [PATCH] libgfs2: Zero de_inum.no_addr when deleting dirents
@ 2014-06-05 10:40 Andrew Price
0 siblings, 0 replies; only message in thread
From: Andrew Price @ 2014-06-05 10:40 UTC (permalink / raw)
To: cluster-devel.redhat.com
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@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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2014-06-05 10:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-05 10:40 [Cluster-devel] [PATCH] libgfs2: Zero de_inum.no_addr when deleting dirents Andrew Price
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).