Re: get_unused_fd and get_unused_fd_flags

From: Ozan ÃaÄlayan
Date: Fri Jun 22 2012 - 05:59:25 EST


> 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.

I've got it. I'm backporting the dma-buf (drivers/base/dma-buf.c)
feature to kernels < 3.3. It is actually pretty straightforward except
a single call to get_unused_fd_flags() from dma_buf_fd(). Then
get_unused_fd_flags() macro resolves to alloc_fd() which is not
exported.

Maybe I should backport alloc_fd and rename it to sth like
compat_alloc_fd and use that instead of alloc_fd in compat. What I was
trying to understand was the reason behind exporting/not-exporting
those similar wrappers. I don't try to justify that it should be
exported for me :)

Thanks!



--
Ozan ÃaÄlayan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/