[PATCH 7/8] xfs: factor common write setup code
Christoph Hellwig
hch at infradead.org
Mon Jan 10 13:26:02 CST 2011
On Fri, Jan 07, 2011 at 10:30:24PM +1100, Dave Chinner wrote:
> From: Dave Chinner <dchinner at redhat.com>
>
> The buffered IO and direct IO write paths share a common set of
> checks and limiting code prior to issuing the write. Factor that
> into a common helper function.
>
> Signed-off-by: Dave Chinner <dchinner at redhat.com>
> Reviewed-by: Alex Elder <aelder at sgi.com>
> ---
> fs/xfs/linux-2.6/xfs_file.c | 128 +++++++++++++++++++-----------------------
> 1 files changed, 58 insertions(+), 70 deletions(-)
>
> diff --git a/fs/xfs/linux-2.6/xfs_file.c b/fs/xfs/linux-2.6/xfs_file.c
> index 9ce5e12..d6ff7ff 100644
> --- a/fs/xfs/linux-2.6/xfs_file.c
> +++ b/fs/xfs/linux-2.6/xfs_file.c
> @@ -620,6 +620,60 @@ out_lock:
> }
> + xfs_rw_ilock(ip, XFS_ILOCK_EXCL|*iolock);
it seems cleaner if we left this in the caller so that locking/unlocking
is not spread over N different layers.
Either way the patch looks correct, so:
Reviewed-by: Christoph Hellwig <hch at lst.de>
More information about the xfs
mailing list