summaryrefslogtreecommitdiff
path: root/fs/kernfs
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2015-12-29 16:03:53 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2015-12-29 16:03:53 -0500
commitcd3417c8fc9504cc1afe944515f338aff9ec286b (patch)
treec60b8132b9deff6d5a5c3f229cce2efd9ac135a3 /fs/kernfs
parent0d0def49d05ae988936268b0e57d19aeef8c3ad2 (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/kernfs')
-rw-r--r--fs/kernfs/symlink.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/kernfs/symlink.c b/fs/kernfs/symlink.c
index ffae8579045d..f9efdaeda7b0 100644
--- a/fs/kernfs/symlink.c
+++ b/fs/kernfs/symlink.c
@@ -116,19 +116,19 @@ static const char *kernfs_iop_get_link(struct dentry *dentry,
struct inode *inode, void **cookie)
{
int error = -ENOMEM;
- unsigned long page;
+ char *page;
if (!dentry)
return ERR_PTR(-ECHILD);
- page = get_zeroed_page(GFP_KERNEL);
+ page = kzalloc(PAGE_SIZE, GFP_KERNEL);
if (!page)
return ERR_PTR(-ENOMEM);
- error = kernfs_getlink(dentry, (char *)page);
+ error = kernfs_getlink(dentry, page);
if (unlikely(error < 0)) {
- free_page((unsigned long)page);
+ kfree(page);
return ERR_PTR(error);
}
- return *cookie = (char *)page;
+ return *cookie = page;
}
const struct inode_operations kernfs_symlink_iops = {
@@ -138,7 +138,7 @@ const struct inode_operations kernfs_symlink_iops = {
.listxattr = kernfs_iop_listxattr,
.readlink = generic_readlink,
.get_link = kernfs_iop_get_link,
- .put_link = free_page_put_link,
+ .put_link = kfree_put_link,
.setattr = kernfs_iop_setattr,
.getattr = kernfs_iop_getattr,
.permission = kernfs_iop_permission,