From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kay Sievers Subject: Re: [PATCH 01/20] sysfs: Implement sysfs_rename_link Date: Thu, 21 May 2009 13:40:04 +0200 Message-ID: References: <1242865694-2100-1-git-send-email-ebiederm@xmission.com> <4A14E836.5090302@kernel.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Tejun Heo , Andrew Morton , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, Cornelia Huck , linux-fsdevel@vger.kernel.org, Benjamin Thery , Daniel Lezcano , "Eric W. Biederman" To: "Eric W. Biederman" Return-path: Received: from mail-fx0-f158.google.com ([209.85.220.158]:64518 "EHLO mail-fx0-f158.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752508AbZEULkY convert rfc822-to-8bit (ORCPT ); Thu, 21 May 2009 07:40:24 -0400 In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Thu, May 21, 2009 at 12:29, Eric W. Biederman wrote: > Kay Sievers writes: >> 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? > > Good point. =C2=A0It looks like I can generalize sysfs_mv_dir into si= mply > being sysfs_rename. =C2=A0All of the existing logic looks like it can= handle > that. =C2=A0I will look at doing an incremental patch for that. Nice, would be great, if that can be made working. It would be much better than the current logic, and there would be no ordering problem, like Tejun mentioned, to solve anymore. As we don't need to change the target for link, maybe: sysfs_rename_file(kobj_parent, old_name, new_name); that can act on symlinks and regular files would be useful? Thanks, Kay -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel= " in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html