Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp934902yba; Wed, 15 May 2019 12:32:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqwikuRIJURIf+XQEO+y0IZVRG/1HdvhvZnmDycWLf5SKbBRGu4r28iIGxXMSjtZrzasaoJ+ X-Received: by 2002:a63:3ece:: with SMTP id l197mr7456455pga.268.1557948768008; Wed, 15 May 2019 12:32:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557948768; cv=none; d=google.com; s=arc-20160816; b=n/7WjFflPDL4TupKO9WhuRyrtNqI5HCWL/ybVG/fyfYIhSkO7qZqsquWU9HeQ7TrRL DrOoq3xNqadKnWkCe006IAvvOlo4lJGWynazMvdV5+8Ht0GA5I4zdult5OrJfYhy0+nu A8fpx0yKKJZdGX+fWrE5bhkTTCmina+ONIfVOvTFd3RsJ+4zY/DUSuaxRdDKTUFbPHu7 vSiQgX+KhRgRJXHCtb3xj4ScdsTq4omQu7WPrU3tP3CLJYdZW4IZQQz2E1FBtbhLG3p8 n3JELk4TuPaikR8KRssEXf4zsDQWb4/tUBeGl8LbjjKtZFMF2yHgBMRQxpDMK1SzNsPd 1wKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=SHhnBKJ3nVUP/c9yq/AoXIRRJvm5ekBFokugaxqmZ/4=; b=D59HouGcFk2zMS/mtmLf2kSozBFvNcycDN8wVccOSBYYHLm6ADz2uJzwu6n0+2xmoA ONCttNeREGic8DH97h77zGgF4OKeyqnlteeE0QMFZGXrDYn2oAvxMZ0rLbbUxjz4WmbX XTnjGyq2atGqwSTxV+90Gx/acI+tRyTpfPj5uzvgh+7b6/IIlS37+sKj8ARV+LD8sKcS q0EPPG8LGGlnDUa5I9tjlbEJff/ruUTIRMovSu8C79HYkx2YY15A5LdigUZ4ZrQ7iW+e L39FlvMYJHt3G8yKsfKFTipSkN/4ibL641O4PxDxM8jQEucwakX8R45+RU18VoFQq61a zLSg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 7si2670791pll.99.2019.05.15.12.32.32; Wed, 15 May 2019 12:32:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727598AbfEOT1e (ORCPT + 99 others); Wed, 15 May 2019 15:27:34 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53864 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726677AbfEOT1d (ORCPT ); Wed, 15 May 2019 15:27:33 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B04FF3004405; Wed, 15 May 2019 19:27:32 +0000 (UTC) Received: from horse.redhat.com (unknown [10.18.25.29]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8ACF31001DE1; Wed, 15 May 2019 19:27:32 +0000 (UTC) Received: by horse.redhat.com (Postfix, from userid 10451) id 769C3225479; Wed, 15 May 2019 15:27:29 -0400 (EDT) From: Vivek Goyal To: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, linux-nvdimm@lists.01.org Cc: vgoyal@redhat.com, miklos@szeredi.hu, stefanha@redhat.com, dgilbert@redhat.com, swhiteho@redhat.com Subject: [PATCH v2 05/30] fuse: export fuse_len_args() Date: Wed, 15 May 2019 15:26:50 -0400 Message-Id: <20190515192715.18000-6-vgoyal@redhat.com> In-Reply-To: <20190515192715.18000-1-vgoyal@redhat.com> References: <20190515192715.18000-1-vgoyal@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Wed, 15 May 2019 19:27:32 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Stefan Hajnoczi virtio-fs will need to query the length of fuse_arg lists. Make the symbol visible. Signed-off-by: Stefan Hajnoczi --- fs/fuse/dev.c | 7 ++++--- fs/fuse/fuse_i.h | 5 +++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c index 46d1aecd7506..d8054b1a45f5 100644 --- a/fs/fuse/dev.c +++ b/fs/fuse/dev.c @@ -350,7 +350,7 @@ void fuse_put_request(struct fuse_conn *fc, struct fuse_req *req) } EXPORT_SYMBOL_GPL(fuse_put_request); -static unsigned len_args(unsigned numargs, struct fuse_arg *args) +unsigned fuse_len_args(unsigned numargs, struct fuse_arg *args) { unsigned nbytes = 0; unsigned i; @@ -360,6 +360,7 @@ static unsigned len_args(unsigned numargs, struct fuse_arg *args) return nbytes; } +EXPORT_SYMBOL_GPL(fuse_len_args); static u64 fuse_get_unique(struct fuse_iqueue *fiq) { @@ -375,7 +376,7 @@ static unsigned int fuse_req_hash(u64 unique) static void queue_request(struct fuse_iqueue *fiq, struct fuse_req *req) { req->in.h.len = sizeof(struct fuse_in_header) + - len_args(req->in.numargs, (struct fuse_arg *) req->in.args); + fuse_len_args(req->in.numargs, (struct fuse_arg *) req->in.args); list_add_tail(&req->list, &fiq->pending); wake_up_locked(&fiq->waitq); kill_fasync(&fiq->fasync, SIGIO, POLL_IN); @@ -1894,7 +1895,7 @@ static int copy_out_args(struct fuse_copy_state *cs, struct fuse_out *out, if (out->h.error) return nbytes != reqsize ? -EINVAL : 0; - reqsize += len_args(out->numargs, out->args); + reqsize += fuse_len_args(out->numargs, out->args); if (reqsize < nbytes || (reqsize > nbytes && !out->argvar)) return -EINVAL; diff --git a/fs/fuse/fuse_i.h b/fs/fuse/fuse_i.h index c4584c873b87..3a235386d667 100644 --- a/fs/fuse/fuse_i.h +++ b/fs/fuse/fuse_i.h @@ -1091,4 +1091,9 @@ int fuse_set_acl(struct inode *inode, struct posix_acl *acl, int type); /* readdir.c */ int fuse_readdir(struct file *file, struct dir_context *ctx); +/** + * Return the number of bytes in an arguments list + */ +unsigned fuse_len_args(unsigned numargs, struct fuse_arg *args); + #endif /* _FS_FUSE_I_H */ -- 2.20.1