Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753243AbbDDTOO (ORCPT ); Sat, 4 Apr 2015 15:14:14 -0400 Received: from mailhub.sw.ru ([195.214.232.25]:2761 "EHLO relay.sw.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753171AbbDDTOD (ORCPT ); Sat, 4 Apr 2015 15:14:03 -0400 From: Dmitry Monakhov To: linux-kernel@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org, viro@zeniv.linux.org.uk, Dmitry Monakhov , xfs@oss.sgi.com Subject: [PATCH 13/16] xfs: use is_xxx_kiocb instead of filp->fl_flags Date: Sat, 4 Apr 2015 23:13:22 +0400 Message-Id: <1428174805-853-14-git-send-email-dmonakhov@openvz.org> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1428174805-853-1-git-send-email-dmonakhov@openvz.org> References: <1428174805-853-1-git-send-email-dmonakhov@openvz.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2192 Lines: 77 Also function interface cleanup in order to vfs:write_iter interface agreeament Cc: xfs@oss.sgi.com Signed-off-by: Dmitry Monakhov --- fs/xfs/xfs_file.c | 13 +++++++------ 1 files changed, 7 insertions(+), 6 deletions(-) diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c index f44212f..148039b 100644 --- a/fs/xfs/xfs_file.c +++ b/fs/xfs/xfs_file.c @@ -279,7 +279,7 @@ xfs_file_read_iter( XFS_STATS_INC(xs_read_calls); - if (unlikely(file->f_flags & O_DIRECT)) + if (unlikely(is_direct_kiocb(iocb))) ioflags |= XFS_IO_ISDIRECT; if (file->f_mode & FMODE_NOCMTIME) ioflags |= XFS_IO_INVIS; @@ -544,17 +544,18 @@ xfs_zero_eof( */ STATIC ssize_t xfs_file_aio_write_checks( - struct file *file, + struct kiocb *iocb, loff_t *pos, size_t *count, int *iolock) { + struct file *file = iocb->ki_filp; struct inode *inode = file->f_mapping->host; struct xfs_inode *ip = XFS_I(inode); int error = 0; restart: - error = generic_write_checks(file, pos, count, S_ISBLK(inode->i_mode)); + error = generic_write_checks(iocb, pos, count, S_ISBLK(inode->i_mode)); if (error) return error; @@ -678,7 +679,7 @@ xfs_file_dio_aio_write( xfs_rw_ilock(ip, iolock); } - ret = xfs_file_aio_write_checks(file, &pos, &count, &iolock); + ret = xfs_file_aio_write_checks(iocb, &pos, &count, &iolock); if (ret) goto out; iov_iter_truncate(from, count); @@ -739,7 +740,7 @@ xfs_file_buffered_aio_write( xfs_rw_ilock(ip, iolock); - ret = xfs_file_aio_write_checks(file, &pos, &count, &iolock); + ret = xfs_file_aio_write_checks(iocb, &pos, &count, &iolock); if (ret) goto out; @@ -803,7 +804,7 @@ xfs_file_write_iter( if (XFS_FORCED_SHUTDOWN(ip->i_mount)) return -EIO; - if (unlikely(file->f_flags & O_DIRECT)) + if (unlikely(is_direct_kiocb(iocb))) ret = xfs_file_dio_aio_write(iocb, from); else ret = xfs_file_buffered_aio_write(iocb, from); -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/