[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20200708174850.7d664e11@canb.auug.org.au>
Date: Wed, 8 Jul 2020 17:48:50 +1000
From: Stephen Rothwell <sfr@...b.auug.org.au>
To: Christoph Hellwig <hch@....de>, David Sterba <dsterba@...e.cz>
Cc: Linux Next Mailing List <linux-next@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Goldwyn Rodrigues <rgoldwyn@...e.com>
Subject: linux-next: manual merge of the set_fs tree with the btrfs tree
Hi all,
Today's linux-next merge of the set_fs tree got a conflict in:
fs/btrfs/file.c
between commit:
8d628ca164a3 ("btrfs: switch to iomap_dio_rw() for dio")
from the btrfs tree and commit:
343f02a47b7e ("fs: default to generic_file_splice_read for files having ->read_iter")
from the set_fs tree.
I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.
--
Cheers,
Stephen Rothwell
diff --cc fs/btrfs/file.c
index 5dcd61b121cc,322cc65902d1..000000000000
--- a/fs/btrfs/file.c
+++ b/fs/btrfs/file.c
@@@ -3541,27 -3504,9 +3541,26 @@@ static int btrfs_file_open(struct inod
return generic_file_open(inode, filp);
}
+static ssize_t btrfs_file_read_iter(struct kiocb *iocb, struct iov_iter *to)
+{
+ ssize_t ret = 0;
+
+ if (iocb->ki_flags & IOCB_DIRECT) {
+ struct inode *inode = file_inode(iocb->ki_filp);
+
+ inode_lock_shared(inode);
+ ret = btrfs_direct_IO(iocb, to);
+ inode_unlock_shared(inode);
+ if (ret < 0)
+ return ret;
+ }
+
+ return generic_file_buffered_read(iocb, to, ret);
+}
+
const struct file_operations btrfs_file_operations = {
.llseek = btrfs_file_llseek,
- .read_iter = generic_file_read_iter,
+ .read_iter = btrfs_file_read_iter,
- .splice_read = generic_file_splice_read,
.write_iter = btrfs_file_write_iter,
.mmap = btrfs_file_mmap,
.open = btrfs_file_open,
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists