summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2016-04-07 08:51:56 -0700
committerAl Viro <viro@zeniv.linux.org.uk>2016-05-01 19:58:39 -0400
commit1af5bb491fbb41c8dab9d728a92758dd6a28afd4 (patch)
tree613a9e606d6c840323884e9b9edff096004719e1 /fs
parentc64fb5c7448c1a0cfa163f126df3c112b6ca3e97 (diff)
downloadlinux-stable-1af5bb491fbb41c8dab9d728a92758dd6a28afd4.tar.gz
linux-stable-1af5bb491fbb41c8dab9d728a92758dd6a28afd4.tar.bz2
linux-stable-1af5bb491fbb41c8dab9d728a92758dd6a28afd4.zip
filemap: remove the pos argument to generic_file_direct_write
Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs')
-rw-r--r--fs/btrfs/file.c9
-rw-r--r--fs/fuse/file.c2
2 files changed, 5 insertions, 6 deletions
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
index 8d7b5a45c005..6c376311a9d7 100644
--- a/fs/btrfs/file.c
+++ b/fs/btrfs/file.c
@@ -1703,18 +1703,17 @@ again:
return num_written ? num_written : ret;
}
-static ssize_t __btrfs_direct_write(struct kiocb *iocb,
- struct iov_iter *from,
- loff_t pos)
+static ssize_t __btrfs_direct_write(struct kiocb *iocb, struct iov_iter *from)
{
struct file *file = iocb->ki_filp;
struct inode *inode = file_inode(file);
+ loff_t pos = iocb->ki_pos;
ssize_t written;
ssize_t written_buffered;
loff_t endbyte;
int err;
- written = generic_file_direct_write(iocb, from, pos);
+ written = generic_file_direct_write(iocb, from);
if (written < 0 || !iov_iter_count(from))
return written;
@@ -1832,7 +1831,7 @@ static ssize_t btrfs_file_write_iter(struct kiocb *iocb,
atomic_inc(&BTRFS_I(inode)->sync_writers);
if (iocb->ki_flags & IOCB_DIRECT) {
- num_written = __btrfs_direct_write(iocb, from, pos);
+ num_written = __btrfs_direct_write(iocb, from);
} else {
num_written = __btrfs_buffered_write(file, from, pos);
if (num_written > 0)
diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index 719924d6c706..7e8c4603d43a 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -1186,7 +1186,7 @@ static ssize_t fuse_file_write_iter(struct kiocb *iocb, struct iov_iter *from)
if (iocb->ki_flags & IOCB_DIRECT) {
loff_t pos = iocb->ki_pos;
- written = generic_file_direct_write(iocb, from, pos);
+ written = generic_file_direct_write(iocb, from);
if (written < 0 || !iov_iter_count(from))
goto out;