xfs: improve mapping type check in xfs_vm_writepage
authorChristoph Hellwig <hch@infradead.org>
Fri, 10 Dec 2010 08:42:16 +0000 (08:42 +0000)
committerAlex Elder <aelder@sgi.com>
Thu, 16 Dec 2010 22:05:34 +0000 (16:05 -0600)
commit85da94c6b4666582c38579ccdcd90a5d9b5697ef
tree013edf60a13fd0a551e95bf76a1284209ecd23c2
parentc9f71f5fc4390ea3a8087c00d53a799e7e0f0f8e
xfs: improve mapping type check in xfs_vm_writepage

Currently we only refuse a "read-only" mapping for writing out
unwritten and delayed buffers, and refuse any other for overwrites.
Improve the checks to require delalloc mappings for delayed buffers,
and unwritten extent mappings for unwritten extents.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Alex Elder <aelder@sgi.com>
fs/xfs/linux-2.6/xfs_aops.c