summaryrefslogtreecommitdiff
path: root/fs/configfs
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2015-12-29 15:58:39 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2015-12-30 13:01:03 -0500
commitfceef393a538134f03b778c5d2519e670269342f (patch)
treecd43c9afdc07852d286965ad4d11772f6c275d1a /fs/configfs
parentcd3417c8fc9504cc1afe944515f338aff9ec286b (diff)
switch ->get_link() to delayed_call, kill ->put_link()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/configfs')
-rw-r--r--fs/configfs/symlink.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/fs/configfs/symlink.c b/fs/configfs/symlink.c
index e9de962e518d..db6d69289608 100644
--- a/fs/configfs/symlink.c
+++ b/fs/configfs/symlink.c
@@ -280,31 +280,32 @@ static int configfs_getlink(struct dentry *dentry, char * path)
}
static const char *configfs_get_link(struct dentry *dentry,
- struct inode *inode, void **cookie)
+ struct inode *inode,
+ struct delayed_call *done)
{
- char *page;
+ char *body;
int error;
if (!dentry)
return ERR_PTR(-ECHILD);
- page = kzalloc(PAGE_SIZE, GFP_KERNEL);
- if (!page)
+ body = kzalloc(PAGE_SIZE, GFP_KERNEL);
+ if (!body)
return ERR_PTR(-ENOMEM);
- error = configfs_getlink(dentry, page);
+ error = configfs_getlink(dentry, body);
if (!error) {
- return *cookie = page;
+ set_delayed_call(done, kfree_link, body);
+ return body;
}
- kfree(page);
+ kfree(body);
return ERR_PTR(error);
}
const struct inode_operations configfs_symlink_inode_operations = {
.get_link = configfs_get_link,
.readlink = generic_readlink,
- .put_link = kfree_put_link,
.setattr = configfs_setattr,
};