linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Jiri Slaby <jirislaby@gmail.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>,
	linux-fsdevel@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] UIO: unbreak uio.h userspace compilation
Date: Tue, 28 Jul 2009 15:31:39 -0400	[thread overview]
Message-ID: <20090728193139.GA11468@infradead.org> (raw)
In-Reply-To: <1248786877-10571-1-git-send-email-jirislaby@gmail.com>

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.


  reply	other threads:[~2009-07-28 19:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-28 13:14 [PATCH 1/1] UIO: unbreak uio.h userspace compilation Jiri Slaby
2009-07-28 19:31 ` Christoph Hellwig [this message]
2009-07-28 19:41   ` [PATCH 1/1] UIO: mark uio.h functions __KERNEL__ only Jiri Slaby
2009-07-28 19:54     ` Sam Ravnborg
2009-07-28 20:05       ` [PATCH v3 " Jiri Slaby
2009-07-28 20:21         ` Sam Ravnborg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090728193139.GA11468@infradead.org \
    --to=hch@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=jirislaby@gmail.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).