Merge tag 'for-linus-4.5-merge-window' of git://git.kernel.org/pub/scm/linux/kernel...
authorLinus Torvalds <torvalds@linux-foundation.org>
Sun, 24 Jan 2016 20:39:09 +0000 (12:39 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 24 Jan 2016 20:39:09 +0000 (12:39 -0800)
Pull 9p updates from Eric Van Hensbergen:
 "Sorry for the last minute pull request, there's was a change that
  didn't get pulled into for-next until two weeks ago and I wanted to
  give it some bake time.

  Summary:

  Rework and error handling fixes, primarily in the fscatch and fd
  transports"

* tag 'for-linus-4.5-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs:
  fs/9p: use fscache mutex rather than spinlock
  9p: trans_fd, bail out if recv fcall if missing
  9p: trans_fd, read rework to use p9_parse_header
  net/9p: Add device name details on error

1  2 
net/9p/trans_virtio.c

diff --combined net/9p/trans_virtio.c
index 199bc76202d2552d23fe964f377bbf69eaf518b9,3827760c8eefd4d2766015679311e3222aa890b2..4acb1d5417aaf980bc7797c817eb9a9a350ecbf5
@@@ -105,7 -105,7 +105,7 @@@ static struct list_head virtio_chan_lis
  /* How many bytes left in this page. */
  static unsigned int rest_of_page(void *data)
  {
 -      return PAGE_SIZE - ((unsigned long)data % PAGE_SIZE);
 +      return PAGE_SIZE - offset_in_page(data);
  }
  
  /**
@@@ -143,6 -143,7 +143,6 @@@ static void p9_virtio_close(struct p9_c
  static void req_done(struct virtqueue *vq)
  {
        struct virtio_chan *chan = vq->vdev->priv;
 -      struct p9_fcall *rc;
        unsigned int len;
        struct p9_req_t *req;
        unsigned long flags;
  
        while (1) {
                spin_lock_irqsave(&chan->lock, flags);
 -              rc = virtqueue_get_buf(chan->vq, &len);
 -              if (rc == NULL) {
 +              req = virtqueue_get_buf(chan->vq, &len);
 +              if (req == NULL) {
                        spin_unlock_irqrestore(&chan->lock, flags);
                        break;
                }
                spin_unlock_irqrestore(&chan->lock, flags);
                /* Wakeup if anyone waiting for VirtIO ring space. */
                wake_up(chan->vc_wq);
 -              p9_debug(P9_DEBUG_TRANS, ": rc %p\n", rc);
 -              p9_debug(P9_DEBUG_TRANS, ": lookup tag %d\n", rc->tag);
 -              req = p9_tag_lookup(chan->client, rc->tag);
                p9_client_cb(chan->client, req, REQ_STATUS_RCVD);
        }
  }
@@@ -280,7 -284,7 +280,7 @@@ req_retry
        if (in)
                sgs[out_sgs + in_sgs++] = chan->sg + out;
  
 -      err = virtqueue_add_sgs(chan->vq, sgs, out_sgs, in_sgs, req->tc,
 +      err = virtqueue_add_sgs(chan->vq, sgs, out_sgs, in_sgs, req,
                                GFP_ATOMIC);
        if (err < 0) {
                if (err == -ENOSPC) {
@@@ -365,7 -369,7 +365,7 @@@ static int p9_get_mapped_pages(struct v
                        return -ENOMEM;
  
                *need_drop = 0;
 -              p -= (*offs = (unsigned long)p % PAGE_SIZE);
 +              p -= (*offs = offset_in_page(p));
                for (index = 0; index < nr_pages; index++) {
                        if (is_vmalloc_addr(p))
                                (*pages)[index] = vmalloc_to_page(p);
@@@ -465,7 -469,7 +465,7 @@@ req_retry_pinned
        }
  
        BUG_ON(out_sgs + in_sgs > ARRAY_SIZE(sgs));
 -      err = virtqueue_add_sgs(chan->vq, sgs, out_sgs, in_sgs, req->tc,
 +      err = virtqueue_add_sgs(chan->vq, sgs, out_sgs, in_sgs, req,
                                GFP_ATOMIC);
        if (err < 0) {
                if (err == -ENOSPC) {
@@@ -658,7 -662,7 +658,7 @@@ p9_virtio_create(struct p9_client *clie
        mutex_unlock(&virtio_9p_lock);
  
        if (!found) {
-               pr_err("no channels available\n");
+               pr_err("no channels available for device %s\n", devname);
                return ret;
        }