Skip to content

Commit

Permalink
Merge branch '9p-fixes' of git://git.kernel.org/pub/scm/linux/kernel/…
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
torvalds committed Nov 23, 2017
2 parents 0c86a6b + 61b272c commit d18bee4
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 15 deletions.
3 changes: 3 additions & 0 deletions fs/9p/vfs_inode.c
Expand Up @@ -483,6 +483,9 @@ static int v9fs_test_inode(struct inode *inode, void *data)

if (v9inode->qid.type != st->qid.type)
return 0;

if (v9inode->qid.path != st->qid.path)
return 0;
return 1;
}

Expand Down
3 changes: 3 additions & 0 deletions fs/9p/vfs_inode_dotl.c
Expand Up @@ -87,6 +87,9 @@ static int v9fs_test_inode_dotl(struct inode *inode, void *data)

if (v9inode->qid.type != st->qid.type)
return 0;

if (v9inode->qid.path != st->qid.path)
return 0;
return 1;
}

Expand Down
5 changes: 2 additions & 3 deletions net/9p/client.c
Expand Up @@ -82,7 +82,7 @@ int p9_show_client_options(struct seq_file *m, struct p9_client *clnt)
{
if (clnt->msize != 8192)
seq_printf(m, ",msize=%u", clnt->msize);
seq_printf(m, "trans=%s", clnt->trans_mod->name);
seq_printf(m, ",trans=%s", clnt->trans_mod->name);

switch (clnt->proto_version) {
case p9_proto_legacy:
Expand Down Expand Up @@ -773,8 +773,7 @@ p9_client_rpc(struct p9_client *c, int8_t type, const char *fmt, ...)
}
again:
/* Wait for the response */
err = wait_event_interruptible(*req->wq,
req->status >= REQ_STATUS_RCVD);
err = wait_event_killable(*req->wq, req->status >= REQ_STATUS_RCVD);

/*
* Make sure our req is coherent with regard to updates in other
Expand Down
6 changes: 3 additions & 3 deletions net/9p/trans_fd.c
Expand Up @@ -724,12 +724,12 @@ static int p9_fd_show_options(struct seq_file *m, struct p9_client *clnt)
{
if (clnt->trans_mod == &p9_tcp_trans) {
if (clnt->trans_opts.tcp.port != P9_PORT)
seq_printf(m, "port=%u", clnt->trans_opts.tcp.port);
seq_printf(m, ",port=%u", clnt->trans_opts.tcp.port);
} else if (clnt->trans_mod == &p9_fd_trans) {
if (clnt->trans_opts.fd.rfd != ~0)
seq_printf(m, "rfd=%u", clnt->trans_opts.fd.rfd);
seq_printf(m, ",rfd=%u", clnt->trans_opts.fd.rfd);
if (clnt->trans_opts.fd.wfd != ~0)
seq_printf(m, "wfd=%u", clnt->trans_opts.fd.wfd);
seq_printf(m, ",wfd=%u", clnt->trans_opts.fd.wfd);
}
return 0;
}
Expand Down
13 changes: 6 additions & 7 deletions net/9p/trans_virtio.c
Expand Up @@ -286,8 +286,8 @@ p9_virtio_request(struct p9_client *client, struct p9_req_t *req)
if (err == -ENOSPC) {
chan->ring_bufs_avail = 0;
spin_unlock_irqrestore(&chan->lock, flags);
err = wait_event_interruptible(*chan->vc_wq,
chan->ring_bufs_avail);
err = wait_event_killable(*chan->vc_wq,
chan->ring_bufs_avail);
if (err == -ERESTARTSYS)
return err;

Expand Down Expand Up @@ -327,7 +327,7 @@ static int p9_get_mapped_pages(struct virtio_chan *chan,
* Other zc request to finish here
*/
if (atomic_read(&vp_pinned) >= chan->p9_max_pages) {
err = wait_event_interruptible(vp_wq,
err = wait_event_killable(vp_wq,
(atomic_read(&vp_pinned) < chan->p9_max_pages));
if (err == -ERESTARTSYS)
return err;
Expand Down Expand Up @@ -471,8 +471,8 @@ p9_virtio_zc_request(struct p9_client *client, struct p9_req_t *req,
if (err == -ENOSPC) {
chan->ring_bufs_avail = 0;
spin_unlock_irqrestore(&chan->lock, flags);
err = wait_event_interruptible(*chan->vc_wq,
chan->ring_bufs_avail);
err = wait_event_killable(*chan->vc_wq,
chan->ring_bufs_avail);
if (err == -ERESTARTSYS)
goto err_out;

Expand All @@ -489,8 +489,7 @@ p9_virtio_zc_request(struct p9_client *client, struct p9_req_t *req,
virtqueue_kick(chan->vq);
spin_unlock_irqrestore(&chan->lock, flags);
p9_debug(P9_DEBUG_TRANS, "virtio request kicked\n");
err = wait_event_interruptible(*req->wq,
req->status >= REQ_STATUS_RCVD);
err = wait_event_killable(*req->wq, req->status >= REQ_STATUS_RCVD);
/*
* Non kernel buffers are pinned, unpin them
*/
Expand Down
4 changes: 2 additions & 2 deletions net/9p/trans_xen.c
Expand Up @@ -156,8 +156,8 @@ static int p9_xen_request(struct p9_client *client, struct p9_req_t *p9_req)
ring = &priv->rings[num];

again:
while (wait_event_interruptible(ring->wq,
p9_xen_write_todo(ring, size)) != 0)
while (wait_event_killable(ring->wq,
p9_xen_write_todo(ring, size)) != 0)
;

spin_lock_irqsave(&ring->lock, flags);
Expand Down

0 comments on commit d18bee4

Please sign in to comment.