From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tejun Heo Subject: Re: [PATCH 01/20] sysfs: Implement sysfs_rename_link Date: Thu, 21 May 2009 14:35:50 +0900 Message-ID: <4A14E836.5090302@kernel.org> References: <1242865694-2100-1-git-send-email-ebiederm@xmission.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: 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 hera.kernel.org ([140.211.167.34]:38372 "EHLO hera.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750847AbZEUFgG (ORCPT ); Thu, 21 May 2009 01:36:06 -0400 In-Reply-To: <1242865694-2100-1-git-send-email-ebiederm@xmission.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Hello, 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. Thanks. -- tejun