Messages in this thread |  | | Date | Tue, 27 May 2014 12:07:53 +1000 | | From | Stephen Rothwell <> | | Subject | linux-next: manual merge of the vfs tree with the ext4 tree |
| |
Hi Al,
Today's linux-next merge of the vfs tree got a conflict in fs/ext4/file.c between commit 00532604c72e ("ext4: introduce new i_write_mutex to protect fallocate") from the ext4 tree and commit 9b884164d597 ("convert ext4 to ->write_iter()") from the vfs tree.
I fixed it up (see below) and can carry the fix as necessary (no action is required).
-- Cheers, Stephen Rothwell sfr@canb.auug.org.au
diff --cc fs/ext4/file.c index 8c39305abc23,708aad768199..000000000000 --- a/fs/ext4/file.c +++ b/fs/ext4/file.c @@@ -101,13 -97,10 +97,12 @@@ ext4_file_write_iter(struct kiocb *iocb struct blk_plug plug; int o_direct = file->f_flags & O_DIRECT; int overwrite = 0; - size_t length = iov_length(iov, nr_segs); + size_t length = iov_iter_count(from); ssize_t ret; - BUG_ON(iocb->ki_pos != pos); + loff_t pos = iocb->ki_pos;
+ mutex_lock(&EXT4_I(inode)->i_write_mutex); + /* * Unaligned direct AIO must be serialized; see comment above * In the case of O_APPEND, assume that we must always serialize @@@ -116,8 -109,9 +111,8 @@@ ext4_test_inode_flag(inode, EXT4_INODE_EXTENTS) && !is_sync_kiocb(iocb) && (file->f_flags & O_APPEND || - ext4_unaligned_aio(inode, iov, nr_segs, pos))) { + ext4_unaligned_aio(inode, from, pos))) { - aio_mutex = ext4_aio_mutex(inode); - mutex_lock(aio_mutex); + unaligned_direct_aio = true; ext4_unwritten_wait(inode); } @@@ -181,10 -172,8 +174,10 @@@ } } - ret = __generic_file_aio_write(iocb, iov, nr_segs); + ret = __generic_file_write_iter(iocb, from); mutex_unlock(&inode->i_mutex); + if (!unaligned_direct_aio) + mutex_unlock(&EXT4_I(inode)->i_write_mutex); if (ret > 0) { ssize_t err; [unhandled content-type:application/pgp-signature] |  |