* [PATCH] sysfs: don't warn on removal of a nonexistent binary file
@ 2007-08-16 20:13 Alan Stern
2007-08-17 1:19 ` Tejun Heo
0 siblings, 1 reply; 3+ messages in thread
From: Alan Stern @ 2007-08-16 20:13 UTC (permalink / raw)
To: Greg KH, Andrew Morton; +Cc: Tejun Heo, Kernel development list
This patch (as960) removes the error message and stack dump logged by
sysfs_remove_bin_file() when someone tries to remove a nonexistent
file. The warning doesn't seem to be needed, since none of the other
file-, symlink-, or directory-removal routines in sysfs complain in a
comparable way.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
---
This is 2.6.23 material. The spurious error message can be triggered
by USB code added since 2.6.22, so it needs to be removed before the
final release.
Alan Stern
Index: usb-2.6/fs/sysfs/bin.c
===================================================================
--- usb-2.6.orig/fs/sysfs/bin.c
+++ usb-2.6/fs/sysfs/bin.c
@@ -248,12 +248,7 @@ int sysfs_create_bin_file(struct kobject
void sysfs_remove_bin_file(struct kobject * kobj, struct bin_attribute * attr)
{
- if (sysfs_hash_and_remove(kobj->sd, attr->attr.name) < 0) {
- printk(KERN_ERR "%s: "
- "bad dentry or inode or no such file: \"%s\"\n",
- __FUNCTION__, attr->attr.name);
- dump_stack();
- }
+ sysfs_hash_and_remove(kobj->sd, attr->attr.name);
}
EXPORT_SYMBOL_GPL(sysfs_create_bin_file);
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] sysfs: don't warn on removal of a nonexistent binary file
2007-08-16 20:13 [PATCH] sysfs: don't warn on removal of a nonexistent binary file Alan Stern
@ 2007-08-17 1:19 ` Tejun Heo
2007-08-17 7:57 ` Cornelia Huck
0 siblings, 1 reply; 3+ messages in thread
From: Tejun Heo @ 2007-08-17 1:19 UTC (permalink / raw)
To: Alan Stern; +Cc: Greg KH, Andrew Morton, Kernel development list
Alan Stern wrote:
> This patch (as960) removes the error message and stack dump logged by
> sysfs_remove_bin_file() when someone tries to remove a nonexistent
> file. The warning doesn't seem to be needed, since none of the other
> file-, symlink-, or directory-removal routines in sysfs complain in a
> comparable way.
>
> Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Tejun Heo <htejun@gmail.com>
--
tejun
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] sysfs: don't warn on removal of a nonexistent binary file
2007-08-17 1:19 ` Tejun Heo
@ 2007-08-17 7:57 ` Cornelia Huck
0 siblings, 0 replies; 3+ messages in thread
From: Cornelia Huck @ 2007-08-17 7:57 UTC (permalink / raw)
To: Tejun Heo; +Cc: Alan Stern, Greg KH, Andrew Morton, Kernel development list
On Fri, 17 Aug 2007 10:19:24 +0900,
Tejun Heo <htejun@gmail.com> wrote:
> Alan Stern wrote:
> > This patch (as960) removes the error message and stack dump logged by
> > sysfs_remove_bin_file() when someone tries to remove a nonexistent
> > file. The warning doesn't seem to be needed, since none of the other
> > file-, symlink-, or directory-removal routines in sysfs complain in a
> > comparable way.
> >
> > Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
>
> Acked-by: Tejun Heo <htejun@gmail.com>
Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-08-17 7:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-16 20:13 [PATCH] sysfs: don't warn on removal of a nonexistent binary file Alan Stern
2007-08-17 1:19 ` Tejun Heo
2007-08-17 7:57 ` Cornelia Huck
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox