diff options
Diffstat (limited to 'fs/configfs/symlink.c')
-rw-r--r-- | fs/configfs/symlink.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/configfs/symlink.c b/fs/configfs/symlink.c index b91c01ebb688..e9de962e518d 100644 --- a/fs/configfs/symlink.c +++ b/fs/configfs/symlink.c | |||
@@ -282,29 +282,29 @@ static int configfs_getlink(struct dentry *dentry, char * path) | |||
282 | static const char *configfs_get_link(struct dentry *dentry, | 282 | static const char *configfs_get_link(struct dentry *dentry, |
283 | struct inode *inode, void **cookie) | 283 | struct inode *inode, void **cookie) |
284 | { | 284 | { |
285 | unsigned long page; | 285 | char *page; |
286 | int error; | 286 | int error; |
287 | 287 | ||
288 | if (!dentry) | 288 | if (!dentry) |
289 | return ERR_PTR(-ECHILD); | 289 | return ERR_PTR(-ECHILD); |
290 | 290 | ||
291 | page = get_zeroed_page(GFP_KERNEL); | 291 | page = kzalloc(PAGE_SIZE, GFP_KERNEL); |
292 | if (!page) | 292 | if (!page) |
293 | return ERR_PTR(-ENOMEM); | 293 | return ERR_PTR(-ENOMEM); |
294 | 294 | ||
295 | error = configfs_getlink(dentry, (char *)page); | 295 | error = configfs_getlink(dentry, page); |
296 | if (!error) { | 296 | if (!error) { |
297 | return *cookie = (void *)page; | 297 | return *cookie = page; |
298 | } | 298 | } |
299 | 299 | ||
300 | free_page(page); | 300 | kfree(page); |
301 | return ERR_PTR(error); | 301 | return ERR_PTR(error); |
302 | } | 302 | } |
303 | 303 | ||
304 | const struct inode_operations configfs_symlink_inode_operations = { | 304 | const struct inode_operations configfs_symlink_inode_operations = { |
305 | .get_link = configfs_get_link, | 305 | .get_link = configfs_get_link, |
306 | .readlink = generic_readlink, | 306 | .readlink = generic_readlink, |
307 | .put_link = free_page_put_link, | 307 | .put_link = kfree_put_link, |
308 | .setattr = configfs_setattr, | 308 | .setattr = configfs_setattr, |
309 | }; | 309 | }; |
310 | 310 | ||