diff --git a/kmod/src/data.c b/kmod/src/data.c index 78dd74ad..54a1857b 100644 --- a/kmod/src/data.c +++ b/kmod/src/data.c @@ -1807,37 +1807,6 @@ int scoutfs_data_wait_check_iov(struct inode *inode, const struct iovec *iov, return ret; } -int scoutfs_data_wait_check_iter(struct inode *inode, loff_t pos, struct iov_iter *iter, - u8 sef, u8 op, struct scoutfs_data_wait *dw, - struct scoutfs_lock *lock) -{ - size_t count = iov_iter_count(iter); - size_t off = iter->iov_offset; - const struct iovec *iov; - size_t len; - int ret = 0; - - for (iov = iter->iov; count > 0; iov++) { - len = iov->iov_len - off; - if (len == 0) - continue; - - /* aren't we waiting on too much data here ? */ - ret = scoutfs_data_wait_check(inode, pos, len, - sef, op, dw, lock); - - if (ret != 0) - break; - - - pos += len; - count -= len; - off = 0; - } - - return ret; -} - int scoutfs_data_wait(struct inode *inode, struct scoutfs_data_wait *dw) { DECLARE_DATA_WAIT_ROOT(inode->i_sb, rt); diff --git a/kmod/src/data.h b/kmod/src/data.h index 1fbfce9b..a34854eb 100644 --- a/kmod/src/data.h +++ b/kmod/src/data.h @@ -65,9 +65,6 @@ int scoutfs_data_wait_check_iov(struct inode *inode, const struct iovec *iov, unsigned long nr_segs, loff_t pos, u8 sef, u8 op, struct scoutfs_data_wait *ow, struct scoutfs_lock *lock); -int scoutfs_data_wait_check_iter(struct inode *inode, loff_t pos, struct iov_iter *iter, - u8 sef, u8 op, struct scoutfs_data_wait *ow, - struct scoutfs_lock *lock); bool scoutfs_data_wait_found(struct scoutfs_data_wait *ow); int scoutfs_data_wait(struct inode *inode, struct scoutfs_data_wait *ow); diff --git a/kmod/src/file.c b/kmod/src/file.c index fd31a9d0..f572a55d 100644 --- a/kmod/src/file.c +++ b/kmod/src/file.c @@ -171,10 +171,8 @@ retry: goto out; if (scoutfs_per_task_add_excl(&si->pt_data_lock, &pt_ent, scoutfs_inode_lock)) { - ret = scoutfs_data_wait_check_iter(inode, iocb->ki_pos, to, - SEF_OFFLINE, - SCOUTFS_IOC_DWO_READ, - &dw, scoutfs_inode_lock); + ret = scoutfs_data_wait_check(inode, iocb->ki_pos, iov_iter_count(to), SEF_OFFLINE, + SCOUTFS_IOC_DWO_READ, &dw, scoutfs_inode_lock); if (ret != 0) goto out; } else {