On Fri, Jan 30, 2015 at 09:42:23AM -0500, Brian Foster wrote: > On Wed, Jan 28, 2015 at 11:54:21PM +0100, Christoph Hellwig wrote: > > Back in the days when the direct I/O ->end_io callback could be called > > from interrupt context for AIO we needed a structure to hand off to the > > workqueue, and reused the ioend structure for this purpose. These days > > ->end_io is always called from user or workqueue context, which allows us > > to avoid this memory allocation and simplify the code significantly. > > > > Signed-off-by: Christoph Hellwig <hch@xxxxxx> > > --- > > Looks mostly Ok to me. In fact, with xfs_finish_ioend_sync() calling > xfs_end_io() directly, I don't see how we currently get into the wq at > all. Anyways, a few notes... I've pulled this in after making the couple of minor changes that Brian suggested.... > > @@ -1507,39 +1514,17 @@ xfs_vm_direct_IO( > > { > > struct inode *inode = iocb->ki_filp->f_mapping->host; > > struct block_device *bdev = xfs_find_bdev_for_inode(inode); > > - struct xfs_ioend *ioend = NULL; > > - ssize_t ret; > > > > if (rw & WRITE) { > > A nit, but I guess you could kill the braces here now too. Given it's a multi-line return statement, the braces are fine. FWIW, when we have a if () { return ...} else { return ... } we normally kill the else. i.e: if (rw & WRITE) { return foo( bar, baz); } return .....; So I modified it like this. Cheers, Dave. -- Dave Chinner david@xxxxxxxxxxxxx _______________________________________________ xfs mailing list xfs@xxxxxxxxxxx http://oss.sgi.com/mailman/listinfo/xfs