• Lachlan McIlroy's avatar
    [XFS] Don't do I/O beyond eof when unreserving space · 2fd6f6ec
    Lachlan McIlroy authored
    When unreserving space with boundaries that are not block aligned we round
    up the start and round down the end boundaries and then use this function,
    xfs_zero_remaining_bytes(), to zero the parts of the blocks that got
    dropped during the rounding. The problem is we don't consider if these
    blocks are beyond eof. Worse still is if we encounter delayed allocations
    beyond eof we will try to use the magic delayed allocation block number as
    a real block number. If the file size is ever extended to expose these
    blocks then we'll go through xfs_zero_eof() to zero them anyway.
    
    SGI-PV: 983683
    
    SGI-Modid: xfs-linux-melb:xfs-kern:32055a
    Signed-off-by: default avatarLachlan McIlroy <lachlan@sgi.com>
    Signed-off-by: default avatarChristoph Hellwig <hch@infradead.org>
    2fd6f6ec
xfs_vnodeops.c 89.2 KB