On Tue, 31 Jul 2007 19:15:08 +0900,
Tejun Heo <[EMAIL PROTECTED]> wrote:

> Make sysfs_add_one() check for duplicate entry and return -EEXIST if
> such entry exists.  This simplifies node addition code a bit.
> 
> This patch doesn't introduce any noticeable behavior change.
> 
> Signed-off-by: Tejun Heo <[EMAIL PROTECTED]>
> ---
>  fs/sysfs/dir.c     |   25 ++++++++++++++++---------
>  fs/sysfs/file.c    |   12 +++++-------
>  fs/sysfs/symlink.c |    9 +++------
>  fs/sysfs/sysfs.h   |    2 +-
>  4 files changed, 25 insertions(+), 23 deletions(-)
> 
> diff --git a/fs/sysfs/dir.c b/fs/sysfs/dir.c
> index 8ce3ffb..69e57be 100644
> --- a/fs/sysfs/dir.c
> +++ b/fs/sysfs/dir.c
> @@ -491,9 +491,15 @@ void sysfs_addrm_start(struct sysfs_addrm_cxt *acxt,
>   *
>   *   LOCKING:
>   *   Determined by sysfs_addrm_start().
> + *
> + *   RETURNS:
> + *   0 on success, -errno on failure.

The only possible failure is -EEXIST, so I'd state that explicitly,
especially since you rely on that fact below.

Otherwise
Acked-by: Cornelia Huck <[EMAIL PROTECTED]>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to