diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-06-17 21:16:55 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-06-17 21:16:55 -0400 |
commit | 4b337c5f245b6587ba844ac7bb13c313a2912f7b (patch) | |
tree | 999c6a6580b76a083c8efb9dabff709d1c49fcd0 /fs/sysfs/symlink.c | |
parent | 492b057c426e4aa747484958e18e9da29003985d (diff) | |
parent | 3fe0344faf7fdcb158bd5c1a9aec960a8d70c8e8 (diff) |
Merge commit 'origin/master' into next
Diffstat (limited to 'fs/sysfs/symlink.c')
-rw-r--r-- | fs/sysfs/symlink.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/sysfs/symlink.c b/fs/sysfs/symlink.c index a3ba217fbe74..1d897ad808e0 100644 --- a/fs/sysfs/symlink.c +++ b/fs/sysfs/symlink.c | |||
@@ -192,8 +192,11 @@ static void *sysfs_follow_link(struct dentry *dentry, struct nameidata *nd) | |||
192 | { | 192 | { |
193 | int error = -ENOMEM; | 193 | int error = -ENOMEM; |
194 | unsigned long page = get_zeroed_page(GFP_KERNEL); | 194 | unsigned long page = get_zeroed_page(GFP_KERNEL); |
195 | if (page) | 195 | if (page) { |
196 | error = sysfs_getlink(dentry, (char *) page); | 196 | error = sysfs_getlink(dentry, (char *) page); |
197 | if (error < 0) | ||
198 | free_page((unsigned long)page); | ||
199 | } | ||
197 | nd_set_link(nd, error ? ERR_PTR(error) : (char *)page); | 200 | nd_set_link(nd, error ? ERR_PTR(error) : (char *)page); |
198 | return NULL; | 201 | return NULL; |
199 | } | 202 | } |