[lkml]   [2009]   [May]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH 01/20] sysfs: Implement sysfs_rename_link
    On Thu, May 21, 2009 at 07:35, Tejun Heo <> wrote:
    > Eric W. Biederman wrote:
    >> +int sysfs_rename_link(struct kobject *kobj, struct kobject *targ,
    >> +                     const char *old, const char *new)
    >> +{
    >> +     sysfs_remove_link(kobj, old);
    >> +     return sysfs_create_link(kobj, targ, new);
    >> +}
    >> +
    > Removal and creation are done in the reverse order compared to the one
    > used in device rename.  The important difference is that previously
    > failed operation was noop whereas it now would remove the current
    > link.  I think the old order is correct.

    The target string is composed on-demand, and it always points to the
    same kobject and *targ is not needed, right?

    Can't we just change the name of the link, instead of removing and
    re-creating the entire thing, and all these issues go away?

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2009-05-21 12:09    [W:0.022 / U:8.428 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site