Re: [PATCH 42/62] sysfs: Remove sysfs_get/put_active_two

From: Tejun Heo
Date: Tue Mar 02 2010 - 20:23:48 EST


Hello, Eric.

On 03/03/2010 08:28 AM, Greg Kroah-Hartman wrote:
> From: Eric W. Biederman <ebiederm@xxxxxxxxxxxx>
>
> It turns out that holding an active reference on a directory is
> pointless. The purpose of the active references are to allows us to
> block when removing sysfs entries that have custom methods so we don't
> remove modules while running modular code and to keep those custom
> methods from accessing data structures after the files have been
> removed.

It's not only the method code but dynamic data structures or even the
actual hardware.

> Further sysfs_remove_dir remove all elements in the
> directory before removing the directory itself, so there is no chance
> we will remove a directory with active children.
>
> Signed-off-by: Eric W. Biederman <ebiederm@xxxxxxxxxxxx>
> Cc: Tejun Heo <tj@xxxxxxxxxx>
> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>

Sans the patch description, Acked-by: Tejun Heo <tj@xxxxxxxxxx>

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