hc
2024-05-10 cde9070d9970eef1f7ec2360586c802a16230ad8
kernel/fs/sysfs/symlink.c
....@@ -6,7 +6,7 @@
66 * Copyright (c) 2007 SUSE Linux Products GmbH
77 * Copyright (c) 2007 Tejun Heo <teheo@suse.de>
88 *
9
- * Please see Documentation/filesystems/sysfs.txt for more information.
9
+ * Please see Documentation/filesystems/sysfs.rst for more information.
1010 */
1111
1212 #include <linux/fs.h>
....@@ -23,7 +23,8 @@
2323 {
2424 struct kernfs_node *kn, *target = NULL;
2525
26
- BUG_ON(!name || !parent);
26
+ if (WARN_ON(!name || !parent))
27
+ return -EINVAL;
2728
2829 /*
2930 * We don't own @target_kobj and it may be removed at any time.
....@@ -133,7 +134,6 @@
133134 spin_unlock(&sysfs_symlink_target_lock);
134135 kernfs_remove_by_name_ns(kobj->sd, name, ns);
135136 }
136
-EXPORT_SYMBOL_GPL(sysfs_delete_link);
137137
138138 /**
139139 * sysfs_remove_link - remove symlink in object's directory.