]> git.baikalelectronics.ru Git - kernel.git/commitdiff
afs: Always get the reply time
authorDavid Howells <dhowells@redhat.com>
Tue, 14 May 2019 10:44:26 +0000 (11:44 +0100)
committerDavid Howells <dhowells@redhat.com>
Thu, 16 May 2019 15:25:21 +0000 (16:25 +0100)
Always ask for the reply time from AF_RXRPC as it's used to calculate the
callback expiry time and lock expiry times, so it's needed by most FS
operations.

Signed-off-by: David Howells <dhowells@redhat.com>
fs/afs/fsclient.c
fs/afs/internal.h
fs/afs/rxrpc.c
fs/afs/vlclient.c
fs/afs/yfsclient.c

index eeba2a359fb4bf44b37034bc964f58e0fda1fd1b..d4bce381697896420dae9da68f87af96ab4ab2c9 100644 (file)
@@ -453,7 +453,6 @@ int afs_fs_fetch_file_status(struct afs_fs_cursor *fc, struct afs_volsync *volsy
        call->xvnode = vnode;
        call->out_volsync = volsync;
        call->expected_version = new_inode ? 1 : vnode->status.data_version;
-       call->want_reply_time = true;
 
        /* marshall the parameters */
        bp = call->request;
@@ -645,7 +644,6 @@ static int afs_fs_fetch_data64(struct afs_fs_cursor *fc, struct afs_read *req)
        call->out_volsync = NULL;
        call->read_request = req;
        call->expected_version = vnode->status.data_version;
-       call->want_reply_time = true;
 
        /* marshall the parameters */
        bp = call->request;
@@ -696,7 +694,6 @@ int afs_fs_fetch_data(struct afs_fs_cursor *fc, struct afs_read *req)
        call->out_volsync = NULL;
        call->read_request = req;
        call->expected_version = vnode->status.data_version;
-       call->want_reply_time = true;
 
        /* marshall the parameters */
        bp = call->request;
@@ -809,7 +806,6 @@ int afs_fs_create(struct afs_fs_cursor *fc,
        call->out_extra_status = newstatus;
        call->out_cb = newcb;
        call->expected_version = current_data_version + 1;
-       call->want_reply_time = true;
 
        /* marshall the parameters */
        bp = call->request;
@@ -1887,7 +1883,6 @@ int afs_fs_set_lock(struct afs_fs_cursor *fc, afs_lock_type_t type)
 
        call->key = fc->key;
        call->xvnode = vnode;
-       call->want_reply_time = true;
 
        /* marshall the parameters */
        bp = call->request;
@@ -1925,7 +1920,6 @@ int afs_fs_extend_lock(struct afs_fs_cursor *fc)
 
        call->key = fc->key;
        call->xvnode = vnode;
-       call->want_reply_time = true;
 
        /* marshall the parameters */
        bp = call->request;
@@ -2101,7 +2095,6 @@ struct afs_call *afs_fs_get_capabilities(struct afs_net *net,
        call->server = afs_get_server(server);
        call->server_index = server_index;
        call->upgrade = true;
-       call->want_reply_time = true;
        call->async = true;
        call->max_lifespan = AFS_PROBE_MAX_LIFESPAN;
 
@@ -2187,7 +2180,6 @@ int afs_fs_fetch_status(struct afs_fs_cursor *fc,
        call->out_cb = callback;
        call->out_volsync = volsync;
        call->expected_version = 1; /* vnode->status.data_version */
-       call->want_reply_time = true;
 
        /* marshall the parameters */
        bp = call->request;
@@ -2361,7 +2353,6 @@ int afs_fs_inline_bulk_status(struct afs_fs_cursor *fc,
        call->out_scb = statuses;
        call->out_volsync = volsync;
        call->count2 = nr_fids;
-       call->want_reply_time = true;
 
        /* marshall the parameters */
        bp = call->request;
index 2a100be9172125bfe80530488f679f56b8cceba8..9b44307bd934333f263f51914209b999804eff70 100644 (file)
@@ -167,7 +167,7 @@ struct afs_call {
        bool                    need_attention; /* T if RxRPC poked us */
        bool                    async;          /* T if asynchronous */
        bool                    upgrade;        /* T to request service upgrade */
-       bool                    want_reply_time; /* T if want reply_time */
+       bool                    have_reply_time; /* T if have got reply_time */
        bool                    intr;           /* T if interruptible */
        u16                     service_id;     /* Actual service ID (after upgrade) */
        unsigned int            debug_id;       /* Trace ID */
index d63e0c9c09e7de6f0f39665c5ab9efc83971e8d9..4fa5ce92b9b97339f0cb2094c73a0223f9dd4da0 100644 (file)
@@ -534,11 +534,11 @@ static void afs_deliver_to_call(struct afs_call *call)
                        return;
                }
 
-               if (call->want_reply_time &&
+               if (!call->have_reply_time &&
                    rxrpc_kernel_get_reply_time(call->net->socket,
                                                call->rxcall,
                                                &call->reply_time))
-                       call->want_reply_time = false;
+                       call->have_reply_time = true;
 
                ret = call->type->deliver(call);
                state = READ_ONCE(call->state);
index 06d010abee96a9565bfa339fb2fef3b5e6018b37..3d4b9836a2e2f0ef0f5eb13f1ce49b90e2605284 100644 (file)
@@ -398,7 +398,6 @@ struct afs_call *afs_vl_get_capabilities(struct afs_net *net,
        call->vlserver = afs_get_vlserver(server);
        call->server_index = server_index;
        call->upgrade = true;
-       call->want_reply_time = true;
        call->async = true;
        call->max_lifespan = AFS_PROBE_MAX_LIFESPAN;
 
index 1f1ccf7b78225f1c8743e11ddd3d1dbd33617928..b3ee99972d2f2a38ee601ffdb29fb63aa9856db1 100644 (file)
@@ -695,7 +695,6 @@ int yfs_fs_fetch_data(struct afs_fs_cursor *fc, struct afs_read *req)
        call->out_volsync = NULL;
        call->read_request = req;
        call->expected_version = vnode->status.data_version;
-       call->want_reply_time = true;
 
        /* marshall the parameters */
        bp = call->request;
@@ -1847,7 +1846,6 @@ int yfs_fs_set_lock(struct afs_fs_cursor *fc, afs_lock_type_t type)
 
        call->key = fc->key;
        call->xvnode = vnode;
-       call->want_reply_time = true;
 
        /* marshall the parameters */
        bp = call->request;
@@ -1886,7 +1884,6 @@ int yfs_fs_extend_lock(struct afs_fs_cursor *fc)
 
        call->key = fc->key;
        call->xvnode = vnode;
-       call->want_reply_time = true;
 
        /* marshall the parameters */
        bp = call->request;