From: Greg Kroah-Hartman <gregkh@suse.de>
To: linux-kernel@vger.kernel.org
Cc: Alan Stern <stern@rowland.harvard.edu>,
Greg Kroah-Hartman <gregkh@suse.de>
Subject: [PATCH 5/5] sysfs: don't warn on removal of a nonexistent binary file
Date: Wed, 22 Aug 2007 15:10:20 -0700 [thread overview]
Message-ID: <11878206634149-git-send-email-gregkh@suse.de> (raw)
In-Reply-To: <11878206493042-git-send-email-gregkh@suse.de>
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
prev parent reply other threads:[~2007-08-22 22:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-22 22:07 [GIT PATCH] driver core fixes for 2.6.23-rc3 Greg KH
2007-08-22 22:10 ` [PATCH 1/5] sysfs: fix locking in sysfs_lookup() and sysfs_rename_dir() Greg Kroah-Hartman
2007-08-22 22:10 ` [PATCH 2/5] Fix Off-by-one in /sys/module/*/refcnt Greg Kroah-Hartman
2007-08-22 22:10 ` [PATCH 3/5] HOWTO: korean translation of Documentation/HOWTO Greg Kroah-Hartman
2007-08-22 22:10 ` [PATCH 4/5] HOWTO: latest lxr url address changed Greg Kroah-Hartman
2007-08-22 22:10 ` Greg Kroah-Hartman [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=11878206634149-git-send-email-gregkh@suse.de \
--to=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=stern@rowland.harvard.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox