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

xfs: add some comments to xfs_iext_insert/xfs_iext_insert_node

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>
上级 43d193aa
......@@ -525,6 +525,10 @@ xfs_iext_insert_node(
if (nr_entries == KEYS_PER_NODE)
new = xfs_iext_split_node(&node, &pos, &nr_entries);
/*
* Update the pointers in higher levels if the first entry changes
* in an existing node.
*/
if (node != new && pos == 0 && nr_entries > 0)
xfs_iext_update_node(ifp, node->keys[0], offset, level, node);
......@@ -643,6 +647,10 @@ xfs_iext_insert(
if (nr_entries == RECS_PER_LEAF)
new = xfs_iext_split_leaf(cur, &nr_entries);
/*
* Update the pointers in higher levels if the first entry changes
* in an existing node.
*/
if (cur->leaf != new && cur->pos == 0 && nr_entries > 0) {
xfs_iext_update_node(ifp, xfs_iext_leaf_key(cur->leaf, 0),
offset, 1, cur->leaf);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册