[PATCH 5/5] sysfs: don't warn on removal of a nonexistent binary file

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <linux-kernel@...>
Cc: Alan Stern <stern@...>, Greg Kroah-Hartman <gregkh@...>
Date: Wednesday, August 22, 2007 - 6:10 pm

From: Alan Stern <stern@rowland.harvard.edu>

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 fs/sysfs/bin.c |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)

diff --git a/fs/sysfs/bin.c b/fs/sysfs/bin.c
index 135353f..5afe2a2 100644
--- a/fs/sysfs/bin.c
+++ b/fs/sysfs/bin.c
@@ -248,12 +248,7 @@ int sysfs_create_bin_file(struct kobject * kobj, struct bin_attribute * attr)
 
 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);
-- 
1.5.3.rc5

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[GIT PATCH] driver core fixes for 2.6.23-rc3, Greg KH, (Wed Aug 22, 6:07 pm)
[PATCH 1/5] sysfs: fix locking in sysfs_lookup() and sysfs_r..., Greg Kroah-Hartman, (Wed Aug 22, 6:10 pm)
[PATCH 2/5] Fix Off-by-one in /sys/module/*/refcnt, Greg Kroah-Hartman, (Wed Aug 22, 6:10 pm)
[PATCH 3/5] HOWTO: korean translation of Documentation/HOWTO, Greg Kroah-Hartman, (Wed Aug 22, 6:10 pm)
[PATCH 4/5] HOWTO: latest lxr url address changed, Greg Kroah-Hartman, (Wed Aug 22, 6:10 pm)
[PATCH 5/5] sysfs: don't warn on removal of a nonexistent bi..., Greg Kroah-Hartman, (Wed Aug 22, 6:10 pm)