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 | 43d193aa0212691254d574b8d207609ef22018b8 (patch) | |
tree | 4e1e44aa97d2f1934536fac260d238796cdef322 /fs/xfs | |
parent | 478f8da0f7c95f847a02f8e3b808926c894e3830 (diff) | |
download | linux-stable-43d193aa0212691254d574b8d207609ef22018b8.tar.gz linux-stable-43d193aa0212691254d574b8d207609ef22018b8.tar.bz2 linux-stable-43d193aa0212691254d574b8d207609ef22018b8.zip |
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: 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')
-rw-r--r-- | fs/xfs/libxfs/xfs_iext_tree.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/xfs/libxfs/xfs_iext_tree.c b/fs/xfs/libxfs/xfs_iext_tree.c index 00d660dcb05e..85d7f708eafc 100644 --- a/fs/xfs/libxfs/xfs_iext_tree.c +++ b/fs/xfs/libxfs/xfs_iext_tree.c @@ -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]); |