diff options
| author | Al Viro <viro@zeniv.linux.org.uk> | 2015-12-29 16:03:53 -0500 |
|---|---|---|
| committer | Al Viro <viro@zeniv.linux.org.uk> | 2015-12-29 16:03:53 -0500 |
| commit | cd3417c8fc9504cc1afe944515f338aff9ec286b (patch) | |
| tree | c60b8132b9deff6d5a5c3f229cce2efd9ac135a3 /fs/configfs | |
| parent | 0d0def49d05ae988936268b0e57d19aeef8c3ad2 (diff) | |
kill free_page_put_link()
all callers are better off with kfree_put_link()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/configfs')
| -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 | ||
