diff options
author | Christoph Hellwig <hch@lst.de> | 2017-11-09 09:11:41 -0800 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2017-11-09 14:08:53 -0800 |
commit | fc258f4b8bb578c39223ff572b4dec8d56a2ed81 (patch) | |
tree | dfc38f4b569a49612f9565266f6fc35925bc2b9b /fs/xfs/libxfs | |
parent | 43d193aa0212691254d574b8d207609ef22018b8 (diff) | |
download | linux-fc258f4b8bb578c39223ff572b4dec8d56a2ed81.tar.gz linux-fc258f4b8bb578c39223ff572b4dec8d56a2ed81.tar.bz2 linux-fc258f4b8bb578c39223ff572b4dec8d56a2ed81.zip |
xfs: add some comments to xfs_iext_insert/xfs_iext_insert_node
Reported-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/xfs/libxfs')
-rw-r--r-- | fs/xfs/libxfs/xfs_iext_tree.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/xfs/libxfs/xfs_iext_tree.c b/fs/xfs/libxfs/xfs_iext_tree.c index 85d7f708eafc..c28a24aca9c5 100644 --- a/fs/xfs/libxfs/xfs_iext_tree.c +++ b/fs/xfs/libxfs/xfs_iext_tree.c @@ -525,6 +525,10 @@ again: 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); |