summaryrefslogtreecommitdiff
path: root/fs/bcachefs/fs-io.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/bcachefs/fs-io.c')
-rw-r--r--fs/bcachefs/fs-io.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/fs/bcachefs/fs-io.c b/fs/bcachefs/fs-io.c
index 051372b88347..4004fa5c1cc9 100644
--- a/fs/bcachefs/fs-io.c
+++ b/fs/bcachefs/fs-io.c
@@ -35,15 +35,6 @@
#include <trace/events/bcachefs.h>
#include <trace/events/writeback.h>
-static inline bool bio_full(struct bio *bio, unsigned len)
-{
- if (bio->bi_vcnt >= bio->bi_max_vecs)
- return true;
- if (bio->bi_iter.bi_size > UINT_MAX - len)
- return true;
- return false;
-}
-
static inline struct address_space *faults_disabled_mapping(void)
{
return (void *) (((unsigned long) current->faults_disabled_mapping) & ~1UL);
@@ -1817,11 +1808,11 @@ again:
* to check that the address is actually valid, when atomic
* usercopies are used, below.
*/
- if (unlikely(fault_in_iov_iter_readable(iter, bytes))) {
+ if (unlikely(iov_iter_fault_in_readable(iter, bytes))) {
bytes = min_t(unsigned long, iov_iter_count(iter),
PAGE_SIZE - offset);
- if (unlikely(fault_in_iov_iter_readable(iter, bytes))) {
+ if (unlikely(iov_iter_fault_in_readable(iter, bytes))) {
ret = -EFAULT;
break;
}
@@ -1879,7 +1870,7 @@ static void bch2_dio_read_complete(struct closure *cl)
{
struct dio_read *dio = container_of(cl, struct dio_read, cl);
- dio->req->ki_complete(dio->req, dio->ret);
+ dio->req->ki_complete(dio->req, dio->ret, 0);
bio_check_or_release(&dio->rbio.bio, dio->should_dirty);
}
@@ -2253,7 +2244,7 @@ err:
inode_dio_end(&inode->v);
if (!sync) {
- req->ki_complete(req, ret);
+ req->ki_complete(req, ret, 0);
ret = -EIOCBQUEUED;
}
return ret;