diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-01-31 16:43:52 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-01-31 16:43:52 -0500 |
commit | bf6c8a81481397e0c53b0a91941d945c785356be (patch) | |
tree | 8cf88707d9fe082263f339f70cb2e0f2cb7d5107 /net | |
parent | aeb8eede8ef5e22a2e7658c3f4e0629b4e5c1265 (diff) | |
parent | c489ee290bdbbace6bb63ebe6ebd4dd605819495 (diff) |
Merge tag 'nfs-for-3.8-4' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
Pull NFS client bugfixes from Trond Myklebust:
- Error reporting in nfs_xdev_mount incorrectly maps all errors to
ENOMEM
- Fix an NFSv4 refcounting issue
- Fix a mount failure when the server reboots during NFSv4 trunking
discovery
- NFSv4.1 mounts may need to run the lease recovery thread.
- Don't silently fail setattr() requests on mountpoints
- Fix a SUNRPC socket/transport livelock and priority queue issue
- We must handle NFS4ERR_DELAY when resetting the NFSv4.1 session.
* tag 'nfs-for-3.8-4' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
NFSv4.1: Handle NFS4ERR_DELAY when resetting the NFSv4.1 session
SUNRPC: When changing the queue priority, ensure that we change the owner
NFS: Don't silently fail setattr() requests on mountpoints
NFSv4.1: Ensure that nfs41_walk_client_list() does start lease recovery
NFSv4: Fix NFSv4 trunking discovery
NFSv4: Fix NFSv4 reference counting for trunked sessions
NFS: Fix error reporting in nfs_xdev_mount
Diffstat (limited to 'net')
-rw-r--r-- | net/sunrpc/sched.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c index bfa31714581f..fb20f25ddec9 100644 --- a/net/sunrpc/sched.c +++ b/net/sunrpc/sched.c | |||
@@ -98,9 +98,25 @@ __rpc_add_timer(struct rpc_wait_queue *queue, struct rpc_task *task) | |||
98 | list_add(&task->u.tk_wait.timer_list, &queue->timer_list.list); | 98 | list_add(&task->u.tk_wait.timer_list, &queue->timer_list.list); |
99 | } | 99 | } |
100 | 100 | ||
101 | static void rpc_rotate_queue_owner(struct rpc_wait_queue *queue) | ||
102 | { | ||
103 | struct list_head *q = &queue->tasks[queue->priority]; | ||
104 | struct rpc_task *task; | ||
105 | |||
106 | if (!list_empty(q)) { | ||
107 | task = list_first_entry(q, struct rpc_task, u.tk_wait.list); | ||
108 | if (task->tk_owner == queue->owner) | ||
109 | list_move_tail(&task->u.tk_wait.list, q); | ||
110 | } | ||
111 | } | ||
112 | |||
101 | static void rpc_set_waitqueue_priority(struct rpc_wait_queue *queue, int priority) | 113 | static void rpc_set_waitqueue_priority(struct rpc_wait_queue *queue, int priority) |
102 | { | 114 | { |
103 | queue->priority = priority; | 115 | if (queue->priority != priority) { |
116 | /* Fairness: rotate the list when changing priority */ | ||
117 | rpc_rotate_queue_owner(queue); | ||
118 | queue->priority = priority; | ||
119 | } | ||
104 | } | 120 | } |
105 | 121 | ||
106 | static void rpc_set_waitqueue_owner(struct rpc_wait_queue *queue, pid_t pid) | 122 | static void rpc_set_waitqueue_owner(struct rpc_wait_queue *queue, pid_t pid) |