From: Andrew Price Date: Thu, 5 Jun 2014 11:40:30 +0100 Subject: [Cluster-devel] [PATCH] libgfs2: Zero de_inum.no_addr when deleting dirents Message-ID: <1401964830-10636-1-git-send-email-anprice@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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 --- 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