From patchwork Mon Apr 5 19:23:06 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 90642 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o35JNCSH000635 for ; Mon, 5 Apr 2010 19:23:12 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755918Ab0DETXK (ORCPT ); Mon, 5 Apr 2010 15:23:10 -0400 Received: from bombadil.infradead.org ([18.85.46.34]:34608 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752103Ab0DETXH (ORCPT ); Mon, 5 Apr 2010 15:23:07 -0400 Received: from hch by bombadil.infradead.org with local (Exim 4.69 #1 (Red Hat Linux)) id 1Nyrt4-0004zE-Qz; Mon, 05 Apr 2010 19:23:06 +0000 Date: Mon, 5 Apr 2010 15:23:06 -0400 From: Christoph Hellwig To: Badari Pulavarty Cc: Christoph Hellwig , kvm@vger.kernel.org Subject: Re: [RFC] vhost-blk implementation Message-ID: <20100405192306.GA15343@infradead.org> References: <1269306023.7931.72.camel@badari-desktop> <20100324200402.GA22272@infradead.org> <4BAA748D.40509@us.ibm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <4BAA748D.40509@us.ibm.com> User-Agent: Mutt/1.5.19 (2009-01-05) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Mon, 05 Apr 2010 19:23:13 +0000 (UTC) Index: linux-2.6/drivers/vhost/blk.c =================================================================== --- linux-2.6.orig/drivers/vhost/blk.c 2010-04-05 21:15:11.638004250 +0200 +++ linux-2.6/drivers/vhost/blk.c 2010-04-05 21:16:13.238004599 +0200 @@ -86,7 +86,7 @@ static void handle_blk(struct vhost_blk nvecs++; BUG_ON(vq->iov[nvecs].iov_len != 1); - if (copy_to_user(vq->iov[nvecs].iov_base, &status, sizeof status) < 0) { + if (copy_to_user(vq->iov[nvecs].iov_base, &status, sizeof status)) { printk("copy to user failed\n"); vhost_discard_vq_desc(vq); break; @@ -199,7 +199,7 @@ static struct miscdevice vhost_blk_misc &vhost_blk_fops, }; -int vhost_blk_init(void) +static int vhost_blk_init(void) { int r = vhost_init(); if (r) @@ -216,7 +216,7 @@ err_init: } module_init(vhost_blk_init); -void vhost_blk_exit(void) +static void vhost_blk_exit(void) { misc_deregister(&vhost_blk_misc); vhost_cleanup();