* [PATCHv9 0/5] Getting rid of get_unused_fd()
@ 2014-10-13 19:30 Yann Droneaud
2014-10-13 19:30 ` [PATCHv9 1/5] ia64: trivial: replace get_unused_fd() by get_unused_fd_flags(0) Yann Droneaud
0 siblings, 1 reply; 2+ messages in thread
From: Yann Droneaud @ 2014-10-13 19:30 UTC (permalink / raw)
To: Tony Luck, Fenghua Yu, linux-ia64, Jeremy Kerr, Arnd Bergmann,
Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
linuxppc-dev, cbe-oss-dev, Al Viro, linux-fsdevel, Andrew Morton,
Jiri Kosina
Cc: Yann Droneaud, linux-kernel
Hi,
Please find the 9th revision of my patchset to remove
get_unused_fd() macro.
In linux-next, tag next-20141013, they're currently:
- 33 calls to fd_install()
with one call part of anon_inode_getfd()
- 27 calls to get_unused_fd_flags()
with one call part of anon_inode_getfd()
with another part of get_unused_fd() macro
- 13 calls to anon_inode_getfd()
- 8 calls to anon_inode_getfile()
with one call part of anon_inode_getfd()
- 5 calls to get_unused_fd()
The following patchset replaces the 5 last calls to
get_unused_fd() by calls to get_unused_fd_flags(0)
and remove the macro so that it won't be used in
newer code.
For some detailed background information, please have
a look at my previous patchset's cover letter[1].
Changes from patchset v8[1]
- fanotify: enable close-on-exec on events' fd when requested in
fanotify_init()
DROPPED: applied upstream, commit 0b37e097a648.
- reduce the amount of explanation in cover letter
[1] http://lkml.kernel.org/r/cover.1411562410.git.ydroneaud@opteya.com
Yann Droneaud (5):
ia64: trivial: replace get_unused_fd() by get_unused_fd_flags(0)
ppc/cell: trivial: replace get_unused_fd() by get_unused_fd_flags(0)
binfmt_misc: trivial: replace get_unused_fd() by
get_unused_fd_flags(0)
file: trivial: replace get_unused_fd() by get_unused_fd_flags(0)
file: remove get_unused_fd() macro
arch/ia64/kernel/perfmon.c | 2 +-
arch/powerpc/platforms/cell/spufs/inode.c | 4 ++--
fs/binfmt_misc.c | 2 +-
fs/file.c | 2 +-
include/linux/file.h | 1 -
5 files changed, 5 insertions(+), 6 deletions(-)
--
1.9.3
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCHv9 1/5] ia64: trivial: replace get_unused_fd() by get_unused_fd_flags(0)
2014-10-13 19:30 [PATCHv9 0/5] Getting rid of get_unused_fd() Yann Droneaud
@ 2014-10-13 19:30 ` Yann Droneaud
0 siblings, 0 replies; 2+ messages in thread
From: Yann Droneaud @ 2014-10-13 19:30 UTC (permalink / raw)
To: Tony Luck, Fenghua Yu, Al Viro, Andrew Morton, Jiri Kosina
Cc: linux-ia64, linux-fsdevel, linux-kernel
This patch replaces calls to get_unused_fd() with equivalent call to
get_unused_fd_flags(0) to preserve current behavor for existing code.
In a further patch, get_unused_fd() will be removed so that new code
start using get_unused_fd_flags(), with the hope O_CLOEXEC could be
used, either by default or choosen by userspace.
Link: http://lkml.kernel.org/r/cover.1413223900.git.ydroneaud@opteya.com
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: trivial@kernel.org
Signed-off-by: Yann Droneaud <ydroneaud@opteya.com>
---
arch/ia64/kernel/perfmon.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c
index 5845ffea67c3..dc063fe6646a 100644
--- a/arch/ia64/kernel/perfmon.c
+++ b/arch/ia64/kernel/perfmon.c
@@ -2662,7 +2662,7 @@ pfm_context_create(pfm_context_t *ctx, void *arg, int count, struct pt_regs *reg
ret = -ENOMEM;
- fd = get_unused_fd();
+ fd = get_unused_fd_flags(0);
if (fd < 0)
return fd;
--
1.9.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-10-13 19:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-13 19:30 [PATCHv9 0/5] Getting rid of get_unused_fd() Yann Droneaud
2014-10-13 19:30 ` [PATCHv9 1/5] ia64: trivial: replace get_unused_fd() by get_unused_fd_flags(0) Yann Droneaud
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).