imamnurby/smpl_train_seed8 huggingface dataset:
--- initial
+++ final
@@ -1,18 +1,18 @@
 static void send_disconnects(struct nbd_device *nbd) {
   struct nbd_config *config = nbd->config;
   struct nbd_request request = {
       .magic = htonl(NBD_REQUEST_MAGIC),
       .type = htonl(NBD_CMD_DISC),
   };
   struct kvec iov = {.iov_base = &request, .iov_len = sizeof(request)};
   struct iov_iter from;
   int i, ret;
   for (i = 0; i < config->num_connections; i++) {
     struct nbd_sock *nsock = config->socks[i];
-    iov_iter_kvec(&from, WRITE | ITER_KVEC, &iov, 1, sizeof(request));
+    iov_iter_kvec(&from, WRITE, &iov, 1, sizeof(request));
     mutex_lock(&nsock->tx_lock);
     ret = sock_xmit(nbd, i, 1, &from, 0, NULL);
     if (ret <= 0) dev_err(disk_to_dev(nbd->disk), "Send disconnect failed %d\n", ret);
     mutex_unlock(&nsock->tx_lock);
   }
 }<sep>@@
expression e1,e2,e3,e4,e;
@@
               iov_iter_kvec(e1,
-                              ITER_KVEC | e
+                              e
                            , e2,e3,e4)
--- initial
+++ final
@@ -1,21 +1,21 @@
 static int send_pkt(struct l2cap_chan *chan, struct sk_buff *skb, struct net_device *netdev) {
   struct msghdr msg;
   struct kvec iv;
   int err;
   /* Remember the skb so that we can send EAGAIN to the caller if
    * we run out of credits.
    */
   chan->data = skb;
   iv.iov_base = skb->data;
   iv.iov_len = skb->len;
   memset(&msg, 0, sizeof(msg));
-  iov_iter_kvec(&msg.msg_iter, WRITE | ITER_KVEC, &iv, 1, skb->len);
+  iov_iter_kvec(&msg.msg_iter, WRITE, &iv, 1, skb->len);
   err = l2cap_chan_send(chan, &msg, skb->len);
   if (err > 0) {
     netdev->stats.tx_bytes += err;
     netdev->stats.tx_packets++;
     return 0;
   }
   if (err < 0) netdev->stats.tx_errors++;
   return err;
 }<sep>@@
expression e1,e2,e3,e4,e;
@@
               iov_iter_kvec(e1,
-                              ITER_KVEC | e
+                              e
                            , e2,e3,e4)
--- initial
+++ final
@@ -1,14 +1,14 @@
 ssize_t vmci_qpair_dequeue(struct vmci_qp *qpair, void *buf, size_t buf_size, int buf_type) {
   ssize_t result;
   struct iov_iter to;
   struct kvec v = {.iov_base = buf, .iov_len = buf_size};
   if (!qpair || !buf) return VMCI_ERROR_INVALID_ARGS;
-  iov_iter_kvec(&to, READ | ITER_KVEC, &v, 1, buf_size);
+  iov_iter_kvec(&to, READ, &v, 1, buf_size);
   qp_lock(qpair);
   do {
     result = qp_dequeue_locked(qpair->produce_q, qpair->consume_q, qpair->consume_q_size, &to, true);
     if (result == VMCI_ERROR_QUEUEPAIR_NOT_READY && !qp_wait_for_ready_queue(qpair)) result = VMCI_ERROR_WOULD_BLOCK;
   } while (result == VMCI_ERROR_QUEUEPAIR_NOT_READY);
   qp_unlock(qpair);
   return result;
 }<sep>@@
expression e1,e2,e3,e4,e;
@@
               iov_iter_kvec(e1,
-                              ITER_KVEC | e
+                              e
                            , e2,e3,e4)
--- initial
+++ final
@@ -1,21 +1,21 @@
 static void afs_load_bvec(struct afs_call *call, struct msghdr *msg, struct bio_vec *bv, pgoff_t first, pgoff_t last, unsigned offset) {
   struct page *pages[AFS_BVEC_MAX];
   unsigned int nr, n, i, to, bytes = 0;
   nr = min_t(pgoff_t, last - first + 1, AFS_BVEC_MAX);
   n = find_get_pages_contig(call->mapping, first, nr, pages);
   ASSERTCMP(n, ==, nr);
   msg->msg_flags |= MSG_MORE;
   for (i = 0; i < nr; i++) {
     to = PAGE_SIZE;
     if (first + i >= last) {
       to = call->last_to;
       msg->msg_flags &= ~MSG_MORE;
     }
     bv[i].bv_page = pages[i];
     bv[i].bv_len = to - offset;
     bv[i].bv_offset = offset;
     bytes += to - offset;
     offset = 0;
   }
-  iov_iter_bvec(&msg->msg_iter, WRITE | ITER_BVEC, bv, nr, bytes);
+  iov_iter_bvec(&msg->msg_iter, WRITE, bv, nr, bytes);
 }<sep>@@
expression e1,e2,e3,e4,e;
@@
               iov_iter_bvec(e1,
-                              ITER_BVEC | e
+                              e
                            , e2,e3,e4)
--- initial
+++ final
@@ -1,61 +1,61 @@
 static int fd_do_rw(struct se_cmd *cmd, struct file *fd, u32 block_size, struct scatterlist *sgl, u32 sgl_nents, u32 data_length, int is_write) {
   struct scatterlist *sg;
   struct iov_iter iter;
   struct bio_vec *bvec;
   ssize_t len = 0;
   loff_t pos = (cmd->t_task_lba * block_size);
   int ret = 0, i;
   bvec = kcalloc(sgl_nents, sizeof(struct bio_vec), GFP_KERNEL);
   if (!bvec) {
     pr_err("Unable to allocate fd_do_readv iov[]\n");
     return -ENOMEM;
   }
   for_each_sg(sgl, sg, sgl_nents, i) {
     bvec[i].bv_page = sg_page(sg);
     bvec[i].bv_len = sg->length;
     bvec[i].bv_offset = sg->offset;
     len += sg->length;
   }
-  iov_iter_bvec(&iter, ITER_BVEC, bvec, sgl_nents, len);
+  iov_iter_bvec(&iter, READ, bvec, sgl_nents, len);
   if (is_write)
     ret = vfs_iter_write(fd, &iter, &pos, 0);
   else
     ret = vfs_iter_read(fd, &iter, &pos, 0);
   if (is_write) {
     if (ret < 0 || ret != data_length) {
       pr_err("%s() write returned %d\n", __func__, ret);
       if (ret >= 0) ret = -EINVAL;
     }
   } else {
     /*
      * Return zeros and GOOD status even if the READ did not return
      * the expected virt_size for struct file w/o a backing struct
      * block_device.
      */
     if (S_ISBLK(file_inode(fd)->i_mode)) {
       if (ret < 0 || ret != data_length) {
         pr_err("%s() returned %d, expecting %u for "
                "S_ISBLK\n",
                __func__, ret, data_length);
         if (ret >= 0) ret = -EINVAL;
       }
     } else {
       if (ret < 0) {
         pr_err("%s() returned %d for non S_ISBLK\n", __func__, ret);
       } else if (ret != data_length) {
         /*
          * Short read case:
          * Probably some one truncate file under us.
          * We must explicitly zero sg-pages to prevent
          * expose uninizialized pages to userspace.
          */
         if (ret < data_length)
           ret += iov_iter_zero(data_length - ret, &iter);
         else
           ret = -EINVAL;
       }
     }
   }
   kfree(bvec);
   return ret;
 }<sep>@@
expression e1,e2,e3,e4;
@@
               iov_iter_bvec(e1,
-                              ITER_BVEC
+                              READ
                            , e2,e3,e4)
--- initial
+++ final
@@ -1,46 +1,46 @@
 static void ceph_aio_complete_req(struct ceph_osd_request *req) {
   int rc = req->r_result;
   struct inode *inode = req->r_inode;
   struct ceph_aio_request *aio_req = req->r_priv;
   struct ceph_osd_data *osd_data = osd_req_op_extent_osd_data(req, 0);
   BUG_ON(osd_data->type != CEPH_OSD_DATA_TYPE_BVECS);
   BUG_ON(!osd_data->num_bvecs);
   dout("ceph_aio_complete_req %p rc %d bytes %u\n", inode, rc, osd_data->bvec_pos.iter.bi_size);
   if (rc == -EOLDSNAPC) {
     struct ceph_aio_work *aio_work;
     BUG_ON(!aio_req->write);
     aio_work = kmalloc(sizeof(*aio_work), GFP_NOFS);
     if (aio_work) {
       INIT_WORK(&aio_work->work, ceph_aio_retry_work);
       aio_work->req = req;
       queue_work(ceph_inode_to_client(inode)->wb_wq, &aio_work->work);
       return;
     }
     rc = -ENOMEM;
   } else if (!aio_req->write) {
     if (rc == -ENOENT) rc = 0;
     if (rc >= 0 && osd_data->bvec_pos.iter.bi_size > rc) {
       struct iov_iter i;
       int zlen = osd_data->bvec_pos.iter.bi_size - rc;
       /*
        * If read is satisfied by single OSD request,
        * it can pass EOF. Otherwise read is within
        * i_size.
        */
       if (aio_req->num_reqs == 1) {
         loff_t i_size = i_size_read(inode);
         loff_t endoff = aio_req->iocb->ki_pos + rc;
         if (endoff < i_size) zlen = min_t(size_t, zlen, i_size - endoff);
         aio_req->total_len = rc + zlen;
       }
-      iov_iter_bvec(&i, ITER_BVEC, osd_data->bvec_pos.bvecs, osd_data->num_bvecs, osd_data->bvec_pos.iter.bi_size);
+      iov_iter_bvec(&i, READ, osd_data->bvec_pos.bvecs, osd_data->num_bvecs, osd_data->bvec_pos.iter.bi_size);
       iov_iter_advance(&i, rc);
       iov_iter_zero(zlen, &i);
     }
   }
   put_bvecs(osd_data->bvec_pos.bvecs, osd_data->num_bvecs, aio_req->should_dirty);
   ceph_osdc_put_request(req);
   if (rc < 0) cmpxchg(&aio_req->error, 0, rc);
   ceph_aio_complete(inode, aio_req);
   return;
 }<sep>@@
expression e1,e2,e3,e4;
@@
               iov_iter_bvec(e1,
-                              ITER_BVEC
+                              READ
                            , e2,e3,e4)
--- initial
+++ final
@@ -1,9 +1,9 @@
 int kernel_recvmsg(struct socket *sock, struct msghdr *msg, struct kvec *vec, size_t num, size_t size, int flags) {
   mm_segment_t oldfs = get_fs();
   int result;
-  iov_iter_kvec(&msg->msg_iter, READ | ITER_KVEC, vec, num, size);
+  iov_iter_kvec(&msg->msg_iter, READ, vec, num, size);
   set_fs(KERNEL_DS);
   result = sock_recvmsg(sock, msg, flags);
   set_fs(oldfs);
   return result;
 }<sep>@@
expression e1,e2,e3,e4,e;
@@
               iov_iter_kvec(e1,
-                              ITER_KVEC | e
+                              e
                            , e2,e3,e4)
--- initial
+++ final
@@ -1,61 +1,61 @@
 static void pvcalls_conn_back_read(void *opaque) {
   struct sock_mapping *map = (struct sock_mapping *)opaque;
   struct msghdr msg;
   struct kvec vec[2];
   RING_IDX cons, prod, size, wanted, array_size, masked_prod, masked_cons;
   int32_t error;
   struct pvcalls_data_intf *intf = map->ring;
   struct pvcalls_data *data = &map->data;
   unsigned long flags;
   int ret;
   array_size = XEN_FLEX_RING_SIZE(map->ring_order);
   cons = intf->in_cons;
   prod = intf->in_prod;
   error = intf->in_error;
   /* read the indexes first, then deal with the data */
   virt_mb();
   if (error) return;
   size = pvcalls_queued(prod, cons, array_size);
   if (size >= array_size) return;
   spin_lock_irqsave(&map->sock->sk->sk_receive_queue.lock, flags);
   if (skb_queue_empty(&map->sock->sk->sk_receive_queue)) {
     atomic_set(&map->read, 0);
     spin_unlock_irqrestore(&map->sock->sk->sk_receive_queue.lock, flags);
     return;
   }
   spin_unlock_irqrestore(&map->sock->sk->sk_receive_queue.lock, flags);
   wanted = array_size - size;
   masked_prod = pvcalls_mask(prod, array_size);
   masked_cons = pvcalls_mask(cons, array_size);
   memset(&msg, 0, sizeof(msg));
   if (masked_prod < masked_cons) {
     vec[0].iov_base = data->in + masked_prod;
     vec[0].iov_len = wanted;
-    iov_iter_kvec(&msg.msg_iter, ITER_KVEC | WRITE, vec, 1, wanted);
+    iov_iter_kvec(&msg.msg_iter, WRITE, vec, 1, wanted);
   } else {
     vec[0].iov_base = data->in + masked_prod;
     vec[0].iov_len = array_size - masked_prod;
     vec[1].iov_base = data->in;
     vec[1].iov_len = wanted - vec[0].iov_len;
-    iov_iter_kvec(&msg.msg_iter, ITER_KVEC | WRITE, vec, 2, wanted);
+    iov_iter_kvec(&msg.msg_iter, WRITE, vec, 2, wanted);
   }
   atomic_set(&map->read, 0);
   ret = inet_recvmsg(map->sock, &msg, wanted, MSG_DONTWAIT);
   WARN_ON(ret > wanted);
   if (ret == -EAGAIN) /* shouldn't happen */
     return;
   if (!ret) ret = -ENOTCONN;
   spin_lock_irqsave(&map->sock->sk->sk_receive_queue.lock, flags);
   if (ret > 0 && !skb_queue_empty(&map->sock->sk->sk_receive_queue)) atomic_inc(&map->read);
   spin_unlock_irqrestore(&map->sock->sk->sk_receive_queue.lock, flags);
   /* write the data, then modify the indexes */
   virt_wmb();
   if (ret < 0)
     intf->in_error = ret;
   else
     intf->in_prod = prod + ret;
   /* update the indexes, then notify the other end */
   virt_wmb();
   notify_remote_via_irq(map->irq);
   return;
 }<sep>@@
expression e1,e2,e3,e4,e;
@@
               iov_iter_kvec(e1,
-                              ITER_KVEC | e
+                              e
                            , e2,e3,e4)
--- initial
+++ final
@@ -1,21 +1,21 @@
 static int tipc_conn_rcv_from_sock(struct tipc_conn *con) {
   struct tipc_topsrv *srv = con->server;
   struct sock *sk = con->sock->sk;
   struct msghdr msg = {};
   struct tipc_subscr s;
   struct kvec iov;
   int ret;
   iov.iov_base = &s;
   iov.iov_len = sizeof(s);
   msg.msg_name = NULL;
-  iov_iter_kvec(&msg.msg_iter, READ | ITER_KVEC, &iov, 1, iov.iov_len);
+  iov_iter_kvec(&msg.msg_iter, READ, &iov, 1, iov.iov_len);
   ret = sock_recvmsg(con->sock, &msg, MSG_DONTWAIT);
   if (ret == -EWOULDBLOCK) return -EWOULDBLOCK;
   if (ret > 0) {
     read_lock_bh(&sk->sk_callback_lock);
     ret = tipc_conn_rcv_sub(srv, con, &s);
     read_unlock_bh(&sk->sk_callback_lock);
   }
   if (ret < 0) tipc_conn_close(con);
   return ret;
 }<sep>@@
expression e1,e2,e3,e4,e;
@@
               iov_iter_kvec(e1,
-                              ITER_KVEC | e
+                              e
                            , e2,e3,e4)
--- initial
+++ final
@@ -1,56 +1,56 @@
 static int lo_rw_aio(struct loop_device *lo, struct loop_cmd *cmd, loff_t pos, bool rw) {
   struct iov_iter iter;
   struct bio_vec *bvec;
   struct request *rq = blk_mq_rq_from_pdu(cmd);
   struct bio *bio = rq->bio;
   struct file *file = lo->lo_backing_file;
   unsigned int offset;
   int segments = 0;
   int ret;
   if (rq->bio != rq->biotail) {
     struct req_iterator iter;
     struct bio_vec tmp;
     __rq_for_each_bio(bio, rq) segments += bio_segments(bio);
     bvec = kmalloc_array(segments, sizeof(struct bio_vec), GFP_NOIO);
     if (!bvec) return -EIO;
     cmd->bvec = bvec;
     /*
      * The bios of the request may be started from the middle of
      * the 'bvec' because of bio splitting, so we can't directly
      * copy bio->bi_iov_vec to new bvec. The rq_for_each_segment
      * API will take care of all details for us.
      */
     rq_for_each_segment(tmp, rq, iter) {
       *bvec = tmp;
       bvec++;
     }
     bvec = cmd->bvec;
     offset = 0;
   } else {
     /*
      * Same here, this bio may be started from the middle of the
      * 'bvec' because of bio splitting, so offset from the bvec
      * must be passed to iov iterator
      */
     offset = bio->bi_iter.bi_bvec_done;
     bvec = __bvec_iter_bvec(bio->bi_io_vec, bio->bi_iter);
     segments = bio_segments(bio);
   }
   atomic_set(&cmd->ref, 2);
-  iov_iter_bvec(&iter, ITER_BVEC | rw, bvec, segments, blk_rq_bytes(rq));
+  iov_iter_bvec(&iter, rw, bvec, segments, blk_rq_bytes(rq));
   iter.iov_offset = offset;
   cmd->iocb.ki_pos = pos;
   cmd->iocb.ki_filp = file;
   cmd->iocb.ki_complete = lo_rw_aio_complete;
   cmd->iocb.ki_flags = IOCB_DIRECT;
   cmd->iocb.ki_ioprio = IOPRIO_PRIO_VALUE(IOPRIO_CLASS_NONE, 0);
   if (cmd->css) kthread_associate_blkcg(cmd->css);
   if (rw == WRITE)
     ret = call_write_iter(file, &cmd->iocb, &iter);
   else
     ret = call_read_iter(file, &cmd->iocb, &iter);
   lo_rw_aio_do_completion(cmd);
   kthread_associate_blkcg(NULL);
   if (ret != -EIOCBQUEUED) cmd->iocb.ki_complete(&cmd->iocb, ret, 0);
   return 0;
 }<sep>@@
expression e1,e2,e3,e4,e;
@@
               iov_iter_bvec(e1,
-                              ITER_BVEC | e
+                              e
                            , e2,e3,e4)
--- initial
+++ final
@@ -1,48 +1,48 @@
 static ssize_t default_file_splice_read(struct file *in, loff_t *ppos, struct pipe_inode_info *pipe, size_t len, unsigned int flags) {
   struct kvec *vec, __vec[PIPE_DEF_BUFFERS];
   struct iov_iter to;
   struct page **pages;
   unsigned int nr_pages;
   size_t offset, base, copied = 0;
   ssize_t res;
   int i;
   if (pipe->nrbufs == pipe->buffers) return -EAGAIN;
   /*
    * Try to keep page boundaries matching to source pagecache ones -
    * it probably won't be much help, but...
    */
   offset = *ppos & ~PAGE_MASK;
-  iov_iter_pipe(&to, ITER_PIPE | READ, pipe, len + offset);
+  iov_iter_pipe(&to, READ, pipe, len + offset);
   res = iov_iter_get_pages_alloc(&to, &pages, len + offset, &base);
   if (res <= 0) return -ENOMEM;
   nr_pages = DIV_ROUND_UP(res + base, PAGE_SIZE);
   vec = __vec;
   if (nr_pages > PIPE_DEF_BUFFERS) {
     vec = kmalloc_array(nr_pages, sizeof(struct kvec), GFP_KERNEL);
     if (unlikely(!vec)) {
       res = -ENOMEM;
       goto out;
     }
   }
   pipe->bufs[to.idx].offset = offset;
   pipe->bufs[to.idx].len -= offset;
   for (i = 0; i < nr_pages; i++) {
     size_t this_len = min_t(size_t, len, PAGE_SIZE - offset);
     vec[i].iov_base = page_address(pages[i]) + offset;
     vec[i].iov_len = this_len;
     len -= this_len;
     offset = 0;
   }
   res = kernel_readv(in, vec, nr_pages, *ppos);
   if (res > 0) {
     copied = res;
     *ppos += res;
   }
   if (vec != __vec) kfree(vec);
 out:
   for (i = 0; i < nr_pages; i++)
     put_page(pages[i]);
   kvfree(pages);
   iov_iter_advance(&to, copied); /* truncates and discards */
   return res;
 }<sep>@@
expression e1,e2,e3,e;
@@
               iov_iter_pipe(e1,
-                              ITER_PIPE | e
+                              e
                            , e2,e3)
--- initial
+++ final
@@ -1,4 +1,4 @@
 int kernel_sendmsg(struct socket *sock, struct msghdr *msg, struct kvec *vec, size_t num, size_t size) {
-  iov_iter_kvec(&msg->msg_iter, WRITE | ITER_KVEC, vec, num, size);
+  iov_iter_kvec(&msg->msg_iter, WRITE, vec, num, size);
   return sock_sendmsg(sock, msg);
 }<sep>@@
expression e1,e2,e3,e4,e;
@@
               iov_iter_kvec(e1,
-                              ITER_KVEC | e
+                              e
                            , e2,e3,e4)
--- initial
+++ final
@@ -1,48 +1,48 @@
 static void pvcalls_conn_back_write(struct sock_mapping *map) {
   struct pvcalls_data_intf *intf = map->ring;
   struct pvcalls_data *data = &map->data;
   struct msghdr msg;
   struct kvec vec[2];
   RING_IDX cons, prod, size, array_size;
   int ret;
   cons = intf->out_cons;
   prod = intf->out_prod;
   /* read the indexes before dealing with the data */
   virt_mb();
   array_size = XEN_FLEX_RING_SIZE(map->ring_order);
   size = pvcalls_queued(prod, cons, array_size);
   if (size == 0) return;
   memset(&msg, 0, sizeof(msg));
   msg.msg_flags |= MSG_DONTWAIT;
   if (pvcalls_mask(prod, array_size) > pvcalls_mask(cons, array_size)) {
     vec[0].iov_base = data->out + pvcalls_mask(cons, array_size);
     vec[0].iov_len = size;
-    iov_iter_kvec(&msg.msg_iter, ITER_KVEC | READ, vec, 1, size);
+    iov_iter_kvec(&msg.msg_iter, READ, vec, 1, size);
   } else {
     vec[0].iov_base = data->out + pvcalls_mask(cons, array_size);
     vec[0].iov_len = array_size - pvcalls_mask(cons, array_size);
     vec[1].iov_base = data->out;
     vec[1].iov_len = size - vec[0].iov_len;
-    iov_iter_kvec(&msg.msg_iter, ITER_KVEC | READ, vec, 2, size);
+    iov_iter_kvec(&msg.msg_iter, READ, vec, 2, size);
   }
   atomic_set(&map->write, 0);
   ret = inet_sendmsg(map->sock, &msg, size);
   if (ret == -EAGAIN || (ret >= 0 && ret < size)) {
     atomic_inc(&map->write);
     atomic_inc(&map->io);
   }
   if (ret == -EAGAIN) return;
   /* write the data, then update the indexes */
   virt_wmb();
   if (ret < 0) {
     intf->out_error = ret;
   } else {
     intf->out_error = 0;
     intf->out_cons = cons + ret;
     prod = intf->out_prod;
   }
   /* update the indexes, then notify the other end */
   virt_wmb();
   if (prod != cons + ret) atomic_inc(&map->write);
   notify_remote_via_irq(map->irq);
 }<sep>@@
expression e1,e2,e3,e4,e;
@@
               iov_iter_kvec(e1,
-                              ITER_KVEC | e
+                              e
                            , e2,e3,e4)
--- initial
+++ final
@@ -1,75 +1,75 @@
 ssize_t iter_file_splice_write(struct pipe_inode_info *pipe, struct file *out, loff_t *ppos, size_t len, unsigned int flags) {
   struct splice_desc sd = {
       .total_len = len,
       .flags = flags,
       .pos = *ppos,
       .u.file = out,
   };
   int nbufs = pipe->buffers;
   struct bio_vec *array = kcalloc(nbufs, sizeof(struct bio_vec), GFP_KERNEL);
   ssize_t ret;
   if (unlikely(!array)) return -ENOMEM;
   pipe_lock(pipe);
   splice_from_pipe_begin(&sd);
   while (sd.total_len) {
     struct iov_iter from;
     size_t left;
     int n, idx;
     ret = splice_from_pipe_next(pipe, &sd);
     if (ret <= 0) break;
     if (unlikely(nbufs < pipe->buffers)) {
       kfree(array);
       nbufs = pipe->buffers;
       array = kcalloc(nbufs, sizeof(struct bio_vec), GFP_KERNEL);
       if (!array) {
         ret = -ENOMEM;
         break;
       }
     }
     /* build the vector */
     left = sd.total_len;
     for (n = 0, idx = pipe->curbuf; left && n < pipe->nrbufs; n++, idx++) {
       struct pipe_buffer *buf = pipe->bufs + idx;
       size_t this_len = buf->len;
       if (this_len > left) this_len = left;
       if (idx == pipe->buffers - 1) idx = -1;
       ret = pipe_buf_confirm(pipe, buf);
       if (unlikely(ret)) {
         if (ret == -ENODATA) ret = 0;
         goto done;
       }
       array[n].bv_page = buf->page;
       array[n].bv_len = this_len;
       array[n].bv_offset = buf->offset;
       left -= this_len;
     }
-    iov_iter_bvec(&from, ITER_BVEC | WRITE, array, n, sd.total_len - left);
+    iov_iter_bvec(&from, WRITE, array, n, sd.total_len - left);
     ret = vfs_iter_write(out, &from, &sd.pos, 0);
     if (ret <= 0) break;
     sd.num_spliced += ret;
     sd.total_len -= ret;
     *ppos = sd.pos;
     /* dismiss the fully eaten buffers, adjust the partial one */
     while (ret) {
       struct pipe_buffer *buf = pipe->bufs + pipe->curbuf;
       if (ret >= buf->len) {
         ret -= buf->len;
         buf->len = 0;
         pipe_buf_release(pipe, buf);
         pipe->curbuf = (pipe->curbuf + 1) & (pipe->buffers - 1);
         pipe->nrbufs--;
         if (pipe->files) sd.need_wakeup = true;
       } else {
         buf->offset += ret;
         buf->len -= ret;
         ret = 0;
       }
     }
   }
 done:
   kfree(array);
   splice_from_pipe_end(pipe, &sd);
   pipe_unlock(pipe);
   if (sd.num_spliced) ret = sd.num_spliced;
   return ret;
 }<sep>@@
expression e1,e2,e3,e4,e;
@@
               iov_iter_bvec(e1,
-                              ITER_BVEC | e
+                              e
                            , e2,e3,e4)
--- initial
+++ final
@@ -1,14 +1,14 @@
 static int ip_vs_receive(struct socket *sock, char *buffer, const size_t buflen) {
   struct msghdr msg = {
       NULL,
   };
   struct kvec iov = {buffer, buflen};
   int len;
   EnterFunction(7);
   /* Receive a packet */
-  iov_iter_kvec(&msg.msg_iter, READ | ITER_KVEC, &iov, 1, buflen);
+  iov_iter_kvec(&msg.msg_iter, READ, &iov, 1, buflen);
   len = sock_recvmsg(sock, &msg, MSG_DONTWAIT);
   if (len < 0) return len;
   LeaveFunction(7);
   return len;
 }<sep>@@
expression e1,e2,e3,e4,e;
@@
               iov_iter_kvec(e1,
-                              ITER_KVEC | e
+                              e
                            , e2,e3,e4)
--- initial
+++ final
@@ -1,20 +1,20 @@
 int tls_device_sendpage(struct sock *sk, struct page *page, int offset, size_t size, int flags) {
   struct iov_iter msg_iter;
   char *kaddr = kmap(page);
   struct kvec iov;
   int rc;
   if (flags & MSG_SENDPAGE_NOTLAST) flags |= MSG_MORE;
   lock_sock(sk);
   if (flags & MSG_OOB) {
     rc = -ENOTSUPP;
     goto out;
   }
   iov.iov_base = kaddr + offset;
   iov.iov_len = size;
-  iov_iter_kvec(&msg_iter, WRITE | ITER_KVEC, &iov, 1, size);
+  iov_iter_kvec(&msg_iter, WRITE, &iov, 1, size);
   rc = tls_push_data(sk, &msg_iter, size, flags, TLS_RECORD_TYPE_DATA);
   kunmap(page);
 out:
   release_sock(sk);
   return rc;
 }<sep>@@
expression e1,e2,e3,e4,e;
@@
               iov_iter_kvec(e1,
-                              ITER_KVEC | e
+                              e
                            , e2,e3,e4)
--- initial
+++ final
@@ -1,6 +1,6 @@
 int cifs_read_from_socket(struct TCP_Server_Info *server, char *buf, unsigned int to_read) {
   struct msghdr smb_msg;
   struct kvec iov = {.iov_base = buf, .iov_len = to_read};
-  iov_iter_kvec(&smb_msg.msg_iter, READ | ITER_KVEC, &iov, 1, to_read);
+  iov_iter_kvec(&smb_msg.msg_iter, READ, &iov, 1, to_read);
   return cifs_readv_from_socket(server, &smb_msg);
 }<sep>@@
expression e1,e2,e3,e4,e;
@@
               iov_iter_kvec(e1,
-                              ITER_KVEC | e
+                              e
                            , e2,e3,e4)