Re: Anonymous inode cleanup?

From: Rajat Jain
Date: Wed Nov 18 2015 - 16:10:18 EST

I see reference taken for the path and module in anon_inode_getfile()

Don't I need to drop that, or would fput() do it for me?


On Wed, Nov 18, 2015 at 1:06 PM, Al Viro <viro@xxxxxxxxxxxxxxxxxx> wrote:
> On Wed, Nov 18, 2015 at 12:28:38PM -0800, Rajat Jain wrote:
>> > _If_ you are returning them via a sucky API, the right sequence is
>> > reserve the descriptor(s)
>> > set the file(s) up
>> > fill whatever structure you'll be using to report descriptors to
>> > userland and copy it to userland memory
>> If this step fails, what is the cleanup needed for "set the files up"
>> anon_inode_getfile() step? is it fput()?
> Yes.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at