aboutsummaryrefslogtreecommitdiffstats
path: root/net/9p
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-11-23 01:17:54 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2017-11-23 01:17:54 -0500
commitd18bee424b129aa4755268feeeb1ee16cbde6afa (patch)
tree6a35fc4eceed28dbdd828e9f641f9f3d9495262b /net/9p
parent0c86a6bd85ff0629cd2c5141027fc1c8bb6cde9c (diff)
parent61b272c3aa170b3e461b8df636407b29f35f98eb (diff)
Merge branch '9p-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull 9p filesystemfixes from Al Viro: "Several 9p fixes" * '9p-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: 9p: Fix missing commas in mount options net/9p: Switch to wait_event_killable() fs/9p: Compare qid.path in v9fs_test_inode
Diffstat (limited to 'net/9p')
-rw-r--r--net/9p/client.c5
-rw-r--r--net/9p/trans_fd.c6
-rw-r--r--net/9p/trans_virtio.c13
-rw-r--r--net/9p/trans_xen.c4
4 files changed, 13 insertions, 15 deletions
diff --git a/net/9p/client.c b/net/9p/client.c
index 4674235b0d9b..b433aff5ff13 100644
--- a/net/9p/client.c
+++ b/net/9p/client.c
@@ -82,7 +82,7 @@ int p9_show_client_options(struct seq_file *m, struct p9_client *clnt)
82{ 82{
83 if (clnt->msize != 8192) 83 if (clnt->msize != 8192)
84 seq_printf(m, ",msize=%u", clnt->msize); 84 seq_printf(m, ",msize=%u", clnt->msize);
85 seq_printf(m, "trans=%s", clnt->trans_mod->name); 85 seq_printf(m, ",trans=%s", clnt->trans_mod->name);
86 86
87 switch (clnt->proto_version) { 87 switch (clnt->proto_version) {
88 case p9_proto_legacy: 88 case p9_proto_legacy:
@@ -773,8 +773,7 @@ p9_client_rpc(struct p9_client *c, int8_t type, const char *fmt, ...)
773 } 773 }
774again: 774again:
775 /* Wait for the response */ 775 /* Wait for the response */
776 err = wait_event_interruptible(*req->wq, 776 err = wait_event_killable(*req->wq, req->status >= REQ_STATUS_RCVD);
777 req->status >= REQ_STATUS_RCVD);
778 777
779 /* 778 /*
780 * Make sure our req is coherent with regard to updates in other 779 * Make sure our req is coherent with regard to updates in other
diff --git a/net/9p/trans_fd.c b/net/9p/trans_fd.c
index 903a190319b9..985046ae4231 100644
--- a/net/9p/trans_fd.c
+++ b/net/9p/trans_fd.c
@@ -724,12 +724,12 @@ static int p9_fd_show_options(struct seq_file *m, struct p9_client *clnt)
724{ 724{
725 if (clnt->trans_mod == &p9_tcp_trans) { 725 if (clnt->trans_mod == &p9_tcp_trans) {
726 if (clnt->trans_opts.tcp.port != P9_PORT) 726 if (clnt->trans_opts.tcp.port != P9_PORT)
727 seq_printf(m, "port=%u", clnt->trans_opts.tcp.port); 727 seq_printf(m, ",port=%u", clnt->trans_opts.tcp.port);
728 } else if (clnt->trans_mod == &p9_fd_trans) { 728 } else if (clnt->trans_mod == &p9_fd_trans) {
729 if (clnt->trans_opts.fd.rfd != ~0) 729 if (clnt->trans_opts.fd.rfd != ~0)
730 seq_printf(m, "rfd=%u", clnt->trans_opts.fd.rfd); 730 seq_printf(m, ",rfd=%u", clnt->trans_opts.fd.rfd);
731 if (clnt->trans_opts.fd.wfd != ~0) 731 if (clnt->trans_opts.fd.wfd != ~0)
732 seq_printf(m, "wfd=%u", clnt->trans_opts.fd.wfd); 732 seq_printf(m, ",wfd=%u", clnt->trans_opts.fd.wfd);
733 } 733 }
734 return 0; 734 return 0;
735} 735}
diff --git a/net/9p/trans_virtio.c b/net/9p/trans_virtio.c
index f24b25c25106..f3a4efcf1456 100644
--- a/net/9p/trans_virtio.c
+++ b/net/9p/trans_virtio.c
@@ -286,8 +286,8 @@ req_retry:
286 if (err == -ENOSPC) { 286 if (err == -ENOSPC) {
287 chan->ring_bufs_avail = 0; 287 chan->ring_bufs_avail = 0;
288 spin_unlock_irqrestore(&chan->lock, flags); 288 spin_unlock_irqrestore(&chan->lock, flags);
289 err = wait_event_interruptible(*chan->vc_wq, 289 err = wait_event_killable(*chan->vc_wq,
290 chan->ring_bufs_avail); 290 chan->ring_bufs_avail);
291 if (err == -ERESTARTSYS) 291 if (err == -ERESTARTSYS)
292 return err; 292 return err;
293 293
@@ -327,7 +327,7 @@ static int p9_get_mapped_pages(struct virtio_chan *chan,
327 * Other zc request to finish here 327 * Other zc request to finish here
328 */ 328 */
329 if (atomic_read(&vp_pinned) >= chan->p9_max_pages) { 329 if (atomic_read(&vp_pinned) >= chan->p9_max_pages) {
330 err = wait_event_interruptible(vp_wq, 330 err = wait_event_killable(vp_wq,
331 (atomic_read(&vp_pinned) < chan->p9_max_pages)); 331 (atomic_read(&vp_pinned) < chan->p9_max_pages));
332 if (err == -ERESTARTSYS) 332 if (err == -ERESTARTSYS)
333 return err; 333 return err;
@@ -471,8 +471,8 @@ req_retry_pinned:
471 if (err == -ENOSPC) { 471 if (err == -ENOSPC) {
472 chan->ring_bufs_avail = 0; 472 chan->ring_bufs_avail = 0;
473 spin_unlock_irqrestore(&chan->lock, flags); 473 spin_unlock_irqrestore(&chan->lock, flags);
474 err = wait_event_interruptible(*chan->vc_wq, 474 err = wait_event_killable(*chan->vc_wq,
475 chan->ring_bufs_avail); 475 chan->ring_bufs_avail);
476 if (err == -ERESTARTSYS) 476 if (err == -ERESTARTSYS)
477 goto err_out; 477 goto err_out;
478 478
@@ -489,8 +489,7 @@ req_retry_pinned:
489 virtqueue_kick(chan->vq); 489 virtqueue_kick(chan->vq);
490 spin_unlock_irqrestore(&chan->lock, flags); 490 spin_unlock_irqrestore(&chan->lock, flags);
491 p9_debug(P9_DEBUG_TRANS, "virtio request kicked\n"); 491 p9_debug(P9_DEBUG_TRANS, "virtio request kicked\n");
492 err = wait_event_interruptible(*req->wq, 492 err = wait_event_killable(*req->wq, req->status >= REQ_STATUS_RCVD);
493 req->status >= REQ_STATUS_RCVD);
494 /* 493 /*
495 * Non kernel buffers are pinned, unpin them 494 * Non kernel buffers are pinned, unpin them
496 */ 495 */
diff --git a/net/9p/trans_xen.c b/net/9p/trans_xen.c
index 6ad3e043c617..325c56043007 100644
--- a/net/9p/trans_xen.c
+++ b/net/9p/trans_xen.c
@@ -156,8 +156,8 @@ static int p9_xen_request(struct p9_client *client, struct p9_req_t *p9_req)
156 ring = &priv->rings[num]; 156 ring = &priv->rings[num];
157 157
158again: 158again:
159 while (wait_event_interruptible(ring->wq, 159 while (wait_event_killable(ring->wq,
160 p9_xen_write_todo(ring, size)) != 0) 160 p9_xen_write_todo(ring, size)) != 0)
161 ; 161 ;
162 162
163 spin_lock_irqsave(&ring->lock, flags); 163 spin_lock_irqsave(&ring->lock, flags);