]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - fs/ecryptfs/inode.c
switch ->get_link() to delayed_call, kill ->put_link()
[mirror_ubuntu-zesty-kernel.git] / fs / ecryptfs / inode.c
index 5a05559cb23de68a3de4ec24af143a722c0900f3..a4dddc61594cbdb7797b1a75cd50fae0ec3a6e77 100644 (file)
@@ -675,7 +675,8 @@ out:
 }
 
 static const char *ecryptfs_get_link(struct dentry *dentry,
-                                    struct inode *inode, void **cookie)
+                                    struct inode *inode,
+                                    struct delayed_call *done)
 {
        size_t len;
        char *buf;
@@ -689,7 +690,8 @@ static const char *ecryptfs_get_link(struct dentry *dentry,
        fsstack_copy_attr_atime(d_inode(dentry),
                                d_inode(ecryptfs_dentry_to_lower(dentry)));
        buf[len] = '\0';
-       return *cookie = buf;
+       set_delayed_call(done, kfree_link, buf);
+       return buf;
 }
 
 /**
@@ -1102,7 +1104,6 @@ out:
 const struct inode_operations ecryptfs_symlink_iops = {
        .readlink = generic_readlink,
        .get_link = ecryptfs_get_link,
-       .put_link = kfree_put_link,
        .permission = ecryptfs_permission,
        .setattr = ecryptfs_setattr,
        .getattr = ecryptfs_getattr_link,