]> git.baikalelectronics.ru Git - kernel.git/commit
[XFS] Don't do I/O beyond eof when unreserving space
authorLachlan McIlroy <lachlan@sgi.com>
Wed, 17 Sep 2008 06:52:50 +0000 (16:52 +1000)
committerLachlan McIlroy <lachlan@redback.melbourne.sgi.com>
Wed, 17 Sep 2008 06:52:50 +0000 (16:52 +1000)
commit9f21629fc47857e1b849c87ca84ae6f8ca9f9fe1
treebfa49e13be769ffbbbc152cb1b771fe10dcb185e
parent0af926218c4b34609a3259b5f3850af32b3304df
[XFS] Don't do I/O beyond eof when unreserving space

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: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
fs/xfs/xfs_vnodeops.c