gfs2-utils: master - libgfs2: Zero de_inum.no_addr when deleting dirents
Andrew Price
andyp at fedoraproject.org
Fri Jun 6 14:30:41 UTC 2014
Gitweb: http://git.fedorahosted.org/git/?p=gfs2-utils.git;a=commitdiff;h=f4fc86b28a551252bd3b8fc1f7e19bf161c600b2
Commit: f4fc86b28a551252bd3b8fc1f7e19bf161c600b2
Parent: 24cac7395ef2559e7bd674e7ba543267672a4bd9
Author: Andrew Price <anprice at redhat.com>
AuthorDate: Thu Jun 5 10:53:07 2014 +0100
Committer: Andrew Price <anprice at redhat.com>
CommitterDate: Thu Jun 5 11:03:49 2014 +0100
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 <anprice at redhat.com>
---
gfs2/libgfs2/fs_ops.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
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;
}
More information about the cluster-commits
mailing list