xfs: refactor xfs_vm_writepage
authorChristoph Hellwig <hch@infradead.org>
Fri, 10 Dec 2010 08:42:24 +0000 (08:42 +0000)
committerAlex Elder <aelder@sgi.com>
Thu, 16 Dec 2010 22:06:03 +0000 (16:06 -0600)
commitaeea1b1f81800e362a3aca86d769d02e137a8fa7
treef010e3af9ade221ea76c368592c54a07aaa4ca82
parent2fa24f92530edaf86c3b5f662464e0d2e3b3e517
xfs: refactor xfs_vm_writepage

After the last patches the code for overwrites is the same as for
delayed and unwritten extents except that it doesn't need to call
xfs_map_at_offset.  Take care of that fact to simplify
xfs_vm_writepage.

The buffer loop now first checks the type of buffer and checks/sets
the ioend type, or continues to the next buffer if it's not
interesting to us.  Only after that we validate the iomap and
perform the block mapping if needed, all in common code for the
cases where we have to do work.

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