Re: [PATCH 01/15] fs: configfs: Add unlocked version of configfs_depend_item()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 20, 2015 at 02:32:32PM +0200, Andrzej Pietrasiewicz wrote:
> From: Krzysztof Opasiak <k.opasiak@xxxxxxxxxxx>
> 
> This change is necessary for the SCSI target usb gadget composed with
> configfs. In this case configfs will be used for two different purposes:
> to compose a usb gadget and to configure the target part. If an instance
> of tcm function is created in $CONFIGFS_ROOT/usb_gadget/<gadget>/functions
> a tpg can be created in $CONFIGFS_ROOT/target/usb_gadget/<wwn>/, but after
> a tpg is created the tcm function must not be removed until its
> corresponding tpg is gone. While the configfs_depend/undepend_item() are
> meant exactly for creating this kind of dependencies, they are not suitable
> if the other kernel subsystem happens to be another subsystem in configfs,
> so this patch adds unlocked versions meant for configfs callbacks.

configfs_depend_item is a lot of deep magic (which I haven't even tried
to fully understand yet).  Can you explain why your versions is safe
without all that?  Can also please document the precoditions required
for the function in comments, or wherever possible asserts?

Also needs a kerneldoc comment explaining the exact semantics.

> +void configfs_undepend_item_unlocked(struct config_item *target)
> +{
> +	configfs_undepend_item(NULL, target);
> +}
> +EXPORT_SYMBOL(configfs_undepend_item_unlocked);

And given that configfs_undepend_item ignores the subsys argument this
wrapper clearl isn't needed.  Just send a separate patch to drop the
subsys argument to configfs_undepend_item instead.

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux