Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761933Ab2FVJrH (ORCPT ); Fri, 22 Jun 2012 05:47:07 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:58097 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1761896Ab2FVJrF (ORCPT ); Fri, 22 Jun 2012 05:47:05 -0400 Date: Fri, 22 Jun 2012 10:47:02 +0100 From: Al Viro To: Ozan ??a??layan Cc: linux-kernel@vger.kernel.org, mcgrof@kernel.org Subject: Re: get_unused_fd and get_unused_fd_flags Message-ID: <20120622094702.GD14083@ZenIV.linux.org.uk> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1124 Lines: 26 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. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/