]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
NFSv4.1: Don't mess with task priorities in nfs41_setup_sequence
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Thu, 1 Nov 2012 20:44:05 +0000 (16:44 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Thu, 1 Nov 2012 21:52:58 +0000 (17:52 -0400)
We want to preserve the rpc_task priority for things like writebacks,
that may have differing levels of urgency.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/nfs4proc.c
net/sunrpc/sched.c

index 7b8dc07d87c682b347254967532fa8b7dd944cba..a6c17924f635c20924ce034803d56aa496c285c3 100644 (file)
@@ -635,7 +635,6 @@ int nfs41_setup_sequence(struct nfs4_session *session,
        }
        spin_unlock(&tbl->slot_tbl_lock);
 
-       rpc_task_set_priority(task, RPC_PRIORITY_NORMAL);
        slot = tbl->slots + slotid;
        args->sa_session = session;
        args->sa_slotid = slotid;
@@ -657,8 +656,10 @@ out_success:
 out_sleep:
        /* Privileged tasks are queued with top priority */
        if (args->sa_privileged)
-               rpc_task_set_priority(task, RPC_PRIORITY_PRIVILEGED);
-       rpc_sleep_on(&tbl->slot_tbl_waitq, task, NULL);
+               rpc_sleep_on_priority(&tbl->slot_tbl_waitq, task,
+                               NULL, RPC_PRIORITY_PRIVILEGED);
+       else
+               rpc_sleep_on(&tbl->slot_tbl_waitq, task, NULL);
        spin_unlock(&tbl->slot_tbl_lock);
        return -EAGAIN;
 }
index 85290266bea0ddc71317f9bcc9b65494eb26a1af..1aefc9fef866b9c71665ebe272ed537fced0ce5e 100644 (file)
@@ -379,6 +379,7 @@ void rpc_sleep_on_priority(struct rpc_wait_queue *q, struct rpc_task *task,
        __rpc_sleep_on_priority(q, task, action, priority - RPC_PRIORITY_LOW);
        spin_unlock_bh(&q->lock);
 }
+EXPORT_SYMBOL_GPL(rpc_sleep_on_priority);
 
 /**
  * __rpc_do_wake_up_task - wake up a single rpc_task