diff options
author | Brian Foster <bfoster@redhat.com> | 2020-07-15 18:44:50 -0700 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2020-07-28 20:24:14 -0700 |
commit | b2a8864728683443f34a9fd33a2b78b860934cc1 (patch) | |
tree | b9f31c69c3ebf96ef39af35f47afd4c3f79bf0fb /fs/exfat | |
parent | f376b45e861d8b7b34bf0eceeecfdd00dbe65cde (diff) | |
download | linux-next-b2a8864728683443f34a9fd33a2b78b860934cc1.tar.gz |
xfs: fix inode allocation block res calculation precedence
The block reservation calculation for inode allocation is supposed
to consist of the blocks required for the inode chunk plus
(maxlevels-1) of the inode btree multiplied by the number of inode
btrees in the fs (2 when finobt is enabled, 1 otherwise).
Instead, the macro returns (ialloc_blocks + 2) due to a precedence
error in the calculation logic. This leads to block reservation
overruns via generic/531 on small block filesystems with finobt
enabled. Add braces to fix the calculation and reserve the
appropriate number of blocks.
Fixes: 9d43b180af67 ("xfs: update inode allocation/free transaction reservations for finobt")
Signed-off-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>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/exfat')
0 files changed, 0 insertions, 0 deletions