diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2015-12-30 00:03:53 +0300 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2015-12-30 00:03:53 +0300 |
commit | cd3417c8fc9504cc1afe944515f338aff9ec286b (patch) | |
tree | c60b8132b9deff6d5a5c3f229cce2efd9ac135a3 /fs/kernfs/symlink.c | |
parent | 0d0def49d05ae988936268b0e57d19aeef8c3ad2 (diff) | |
download | linux-cd3417c8fc9504cc1afe944515f338aff9ec286b.tar.xz |
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/symlink.c')
-rw-r--r-- | fs/kernfs/symlink.c | 12 |
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, |