On Fri, Jan 07, 2011 at 10:30:24PM +1100, Dave Chinner wrote: > From: Dave Chinner <dchinner@xxxxxxxxxx> > > 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@xxxxxxxxxx> > Reviewed-by: Alex Elder <aelder@xxxxxxx> > --- > 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@xxxxxx> _______________________________________________ xfs mailing list xfs@xxxxxxxxxxx http://oss.sgi.com/mailman/listinfo/xfs