diff options
| author | Andrew Morton <akpm@digeo.com> | 2003-05-18 20:26:39 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2003-05-18 20:26:39 -0700 |
| commit | a209bc783232c668923f2677451fedab74a0e367 (patch) | |
| tree | b6c61c621a53564234e611549928752ba693d34b /fs | |
| parent | d847507434bbeda3e22b5f2c1cd5c486905ec1ab (diff) | |
[PATCH] sysfs_create_link() fix
It is incorrectly precalculating the string's length.
Diffstat (limited to 'fs')
| -rw-r--r-- | fs/sysfs/symlink.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/sysfs/symlink.c b/fs/sysfs/symlink.c index 5a2bd9c90a38..8ec65b81bdce 100644 --- a/fs/sysfs/symlink.c +++ b/fs/sysfs/symlink.c @@ -80,7 +80,7 @@ int sysfs_create_link(struct kobject * kobj, struct kobject * target, char * nam char * s; depth = object_depth(kobj); - size = object_path_length(target) + depth * 3 - 1; + size = object_path_length(target) + depth * 3 + 1; if (size > PATH_MAX) return -ENAMETOOLONG; pr_debug("%s: depth = %d, size = %d\n",__FUNCTION__,depth,size); |
