[lkml]   [2009]   [May]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 03/20] sysfs: Remove now unnecessary error reporting suppression.
Eric W. Biederman wrote:
> Tejun Heo <> writes:
>> Eric W. Biederman wrote:
>>> From: Eric W. Biederman <>
>>> Now that we use sysfs_rename_link in the places we previously
>>> used sysfs_create_link_nowarn we can remove sysfs_create_link_nowarn
>>> and all it's supporting infrastructure.
>> I'm not entirely sure why implementing a rename helper means that we
>> don't need nowarn version anymore. Nothing really changed or is it
>> that the nowarn version wasn't too necessary anyway?
> nowarn was used exclusively in the hand coded version of rename. By
> switching the order I was able perform the operations such that even
> if the operation is ultimately a noop and are attempt to recreate the
> same link we won't have problems.
> The two callers of device_rename are required (and do) perform locking
> to ensure the rename operation is safe. So the exact implementation
> in the sysfs does not matter. Although making it atomic would be
> ideal.
> The nowarn helpers existed because the order was backwards in
> device rename and when a noop rename happened sysfs would mistakenly
> think there was a problem and complain. I think the upper
> layers suppress that case now for a while at least it lead to
> a lot of spurious warnings.

But, still, removing the original link on failure doesn't sound too
enticing. Wouldn't it be better to detect the noop special case and
do nothing instead of swapping the order?



 \ /
  Last update: 2009-05-21 08:23    [W:0.073 / U:0.596 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site