NFSv4: Append delegations to the per-client list instead of prepending
authorTrond Myklebust <trond.myklebust@primarydata.com>
Wed, 4 Mar 2015 20:59:05 +0000 (15:59 -0500)
committerTrond Myklebust <trond.myklebust@primarydata.com>
Thu, 12 Mar 2015 16:13:56 +0000 (12:13 -0400)
Do so on the assumption that for most use cases, that list will turn into
a more or less LRU-ordered list, and so the list traversals in
nfs_client_return_marked_delegations() are likely to be shorter before
hitting a candidate to return.

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
fs/nfs/delegation.c

index a6ad688658803424d726afae85597ad2ace80044..540ee260318c91693511a8acf4039e151baf449d 100644 (file)
@@ -378,7 +378,7 @@ int nfs_inode_set_delegation(struct inode *inode, struct rpc_cred *cred, struct
                if (freeme == NULL)
                        goto out;
        }
-       list_add_rcu(&delegation->super_list, &server->delegations);
+       list_add_tail_rcu(&delegation->super_list, &server->delegations);
        rcu_assign_pointer(nfsi->delegation, delegation);
        delegation = NULL;