From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [PATCH 1/1] UIO: unbreak uio.h userspace compilation Date: Tue, 28 Jul 2009 15:31:39 -0400 Message-ID: <20090728193139.GA11468@infradead.org> References: <1248786877-10571-1-git-send-email-jirislaby@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Alexander Viro , linux-fsdevel@vger.kernel.org, Andrew Morton , linux-kernel@vger.kernel.org To: Jiri Slaby Return-path: Received: from bombadil.infradead.org ([18.85.46.34]:55538 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754362AbZG1Tbl (ORCPT ); Tue, 28 Jul 2009 15:31:41 -0400 Content-Disposition: inline In-Reply-To: <1248786877-10571-1-git-send-email-jirislaby@gmail.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Tue, Jul 28, 2009 at 03:14:37PM +0200, Jiri Slaby wrote: > diff --git a/include/linux/uio.h b/include/linux/uio.h > index b7fe138..9b2623c 100644 > --- a/include/linux/uio.h > +++ b/include/linux/uio.h > @@ -42,16 +42,18 @@ struct kvec { > * segment lengths have been validated. Because the individual lengths can > * overflow a size_t when added together. > */ > -static inline size_t iov_length(const struct iovec *iov, unsigned long nr_segs) > +static inline __kernel_size_t iov_length(const struct iovec *iov, unsigned long nr_segs) > { > unsigned long seg; > - size_t ret = 0; > + __kernel_size_t ret = 0; > > for (seg = 0; seg < nr_segs; seg++) > ret += iov[seg].iov_len; > return ret; > } > > +#ifdef __KERNEL__ > unsigned long iov_shorten(struct iovec *iov, unsigned long nr_segs, size_t to); > +#endif iov_length is kernel internal and should not be exported to userspace.