All of lore.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@ZenIV.linux.org.uk>
To: Ozan ??a??layan <ozancag@gmail.com>
Cc: linux-kernel@vger.kernel.org, mcgrof@kernel.org
Subject: Re: get_unused_fd and get_unused_fd_flags
Date: Fri, 22 Jun 2012 10:47:02 +0100	[thread overview]
Message-ID: <20120622094702.GD14083@ZenIV.linux.org.uk> (raw)
In-Reply-To: <CAFub=KRdM2Mc1RXa_HfYO8gSxpyCpsP9Z1YHRULCLwNDnXQyEg@mail.gmail.com>

On Fri, Jun 22, 2012 at 12:33:35PM +0300, Ozan ??a??layan wrote:
> But get_unused_fd_flags() is implemented through a macro:
> 
> #define get_unused_fd_flags(flags) alloc_fd(0, (flags))
> 
> Both are wrappers around alloc_fd(). I'm quite new to this stuff but
> why there's an asymmetry in here? One is exposed, the other is not.

Because get_unused_fd_flags() never had been exported.  And
default policy for exports is "Don't, unless somebody can
demonstrate a clear need that can't be handled in other
ways".

> (BTW: I'm doing compat-drm stuff for GSoC and I have to call
> get_unused_fd_flags() but since alloc_fd() is not exported, this
> doesn't work.)

Details of that "have to", please.  Note that existing modular uses of
get_unused_fd() tend to be rather fishy; if anything, I'd expect
get_unused_fd() eventually becoming internal-only, if we manage to
pull that off.

  reply	other threads:[~2012-06-22  9:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-22  9:33 get_unused_fd and get_unused_fd_flags Ozan Çağlayan
2012-06-22  9:47 ` Al Viro [this message]
2012-06-22  9:59   ` Ozan Çağlayan
2012-06-22 10:34     ` Ozan Çağlayan

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=20120622094702.GD14083@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mcgrof@kernel.org \
    --cc=ozancag@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.