commit 1faaeeacae5c868e72e327e821ba118da7cbd6cd Author: Bob Peterson <bob@ganesha.peterson> Date: Thu Jan 21 17:15:24 2010 -0600 libgfs2: dir_split_leaf needs to zero out the new leaf The dir_split_leaf function was not clearing out the new leaf block it had allocated, so there was likely to be trash left on the block. Granted, this is pretty rare, but I actually saw it in a situation where lots of orphaned dinodes were tossed into lost+found. rhbz#455300 diff --git a/gfs2/libgfs2/fs_ops.c b/gfs2/libgfs2/fs_ops.c index e9c7626..f670aa5 100644 --- a/gfs2/libgfs2/fs_ops.c +++ b/gfs2/libgfs2/fs_ops.c @@ -853,6 +853,8 @@ static void dir_split_leaf(struct gfs2_inode *dip, uint32_t lindex, mh.mh_type = GFS2_METATYPE_LF; mh.mh_format = GFS2_FORMAT_LF; gfs2_meta_header_out(&mh, nbh); + buffer_clear_tail(dip->i_sbd, nbh, + sizeof(struct gfs2_meta_header)); } nleaf = (struct gfs2_leaf *)nbh->b_data;