Commit a193c746 authored by Andrew Morton's avatar Andrew Morton Committed by David S. Miller

[PATCH] revert sysfs non-fix

I completely misread this code and there was no bug.  In fact yesterday's fix
broke it.  Revert.
parent 27a044d5
...@@ -80,7 +80,7 @@ int sysfs_create_link(struct kobject * kobj, struct kobject * target, char * nam ...@@ -80,7 +80,7 @@ int sysfs_create_link(struct kobject * kobj, struct kobject * target, char * nam
char * s; char * s;
depth = object_depth(kobj); depth = object_depth(kobj);
size = object_path_length(target) + depth * 3 + 1; size = object_path_length(target) + depth * 3 - 1;
if (size > PATH_MAX) if (size > PATH_MAX)
return -ENAMETOOLONG; return -ENAMETOOLONG;
pr_debug("%s: depth = %d, size = %d\n",__FUNCTION__,depth,size); pr_debug("%s: depth = %d, size = %d\n",__FUNCTION__,depth,size);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment