• D
    xfs: fix overfilling of reserve pool · 82be38bc
    Darrick J. Wong 提交于
    Due to cycling of m_sb_lock, it's possible for multiple callers of
    xfs_reserve_blocks to race at changing the pool size, subtracting blocks
    from fdblocks, and actually putting it in the pool.  The result of all
    this is that we can overfill the reserve pool to hilarious levels.
    
    xfs_mod_fdblocks, when called with a positive value, already knows how
    to take freed blocks and either fill the reserve until it's full, or put
    them in fdblocks.  Use that instead of setting m_resblks_avail directly.
    Signed-off-by: NDarrick J. Wong <djwong@kernel.org>
    Reviewed-by: NDave Chinner <dchinner@redhat.com>
    82be38bc
xfs_fsops.c 15.3 KB