提交 43d193aa 编写于 作者: C Christoph Hellwig 提交者: Darrick J. Wong

xfs: fix number of records handling in xfs_iext_split_leaf

Fix to check the correct value, and remove a duplicate handling of the
uneven record number split algorith,
Reported-by: NBrian Foster <bfoster@redhat.com>
Signed-off-by: NChristoph Hellwig <hch@lst.de>
Reviewed-by: NBrian Foster <bfoster@redhat.com>
Reviewed-by: NDarrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: NDarrick J. Wong <darrick.wong@oracle.com>
上级 478f8da0
......@@ -555,16 +555,13 @@ xfs_iext_split_leaf(
int i;
/* for sequential append operations just spill over into the new node */
if (cur->pos == KEYS_PER_NODE) {
if (cur->pos == RECS_PER_LEAF) {
cur->leaf = new;
cur->pos = 0;
*nr_entries = 0;
goto done;
}
if (nr_keep & 1)
nr_keep++;
for (i = 0; i < nr_move; i++) {
new->recs[i] = leaf->recs[nr_keep + i];
xfs_iext_rec_clear(&leaf->recs[nr_keep + i]);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册