afs: Use alternative invalidation to using launder_folio
[linux-2.6-block.git] / fs / afs / write.c
index 74402d95a88434bb58e1e3989d296c11d8f9861d..1bc26466eb727bca70e4bedbf17f0f1908265711 100644 (file)
@@ -75,8 +75,7 @@ static void afs_store_data_success(struct afs_operation *op)
        op->ctime = op->file[0].scb.status.mtime_client;
        afs_vnode_commit_status(op, &op->file[0]);
        if (!afs_op_error(op)) {
-               if (!op->store.laundering)
-                       afs_pages_written_back(vnode, op->store.pos, op->store.size);
+               afs_pages_written_back(vnode, op->store.pos, op->store.size);
                afs_stat_v(vnode, n_stores);
                atomic_long_add(op->store.size, &afs_v2net(vnode)->n_store_bytes);
        }
@@ -91,8 +90,7 @@ static const struct afs_operation_ops afs_store_data_operation = {
 /*
  * write to a file
  */
-static int afs_store_data(struct afs_vnode *vnode, struct iov_iter *iter, loff_t pos,
-                         bool laundering)
+static int afs_store_data(struct afs_vnode *vnode, struct iov_iter *iter, loff_t pos)
 {
        struct afs_operation *op;
        struct afs_wb_key *wbk = NULL;
@@ -123,7 +121,6 @@ static int afs_store_data(struct afs_vnode *vnode, struct iov_iter *iter, loff_t
        op->file[0].modification = true;
        op->store.pos = pos;
        op->store.size = size;
-       op->store.laundering = laundering;
        op->flags |= AFS_OPERATION_UNINTR;
        op->ops = &afs_store_data_operation;
 
@@ -168,8 +165,7 @@ static void afs_upload_to_server(struct netfs_io_subrequest *subreq)
               subreq->rreq->debug_id, subreq->debug_index, subreq->io_iter.count);
 
        trace_netfs_sreq(subreq, netfs_sreq_trace_submit);
-       ret = afs_store_data(vnode, &subreq->io_iter, subreq->start,
-                            subreq->rreq->origin == NETFS_LAUNDER_WRITE);
+       ret = afs_store_data(vnode, &subreq->io_iter, subreq->start);
        netfs_write_subrequest_terminated(subreq, ret < 0 ? ret : subreq->len,
                                          false);
 }