RE: [RFC 0/2] USB gadget - configfs

From: Andrzej Pietrasiewicz
Date: Wed Aug 29 2012 - 09:17:53 EST


Hello Joel,

On Monday, August 20, 2012 8:00 AM Joel Becker wrote:

<snip>

> I think what you want here is a symlink. Create a directory high in
> the tree called 'ready' or 'available', and when you want to lock the
> device in place, symlink it into that directory. This will pin the item.
> You can also make use of the ->allow_link() and ->drop_link() callbacks to
> prevent symlinking an item until it is fully configured, and prevent
> unlinking an item that is in use.
>

I have a question to you. In fs/configfs/dir.c, in a comment before
configfs_depend_item and configfs_depend_prep you say that "configfs uses
VFS to handle all locking". I am trying to understand how this
works. Could you please elaborate a bit about it? Which locks from VFS
handle "all locking"? When does locking happen?

Thanks,

Andrzej



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