[poky] [kernel 4/6] fs: yaffs2: kill ->put_link()

Kevin Hao kexin.hao at windriver.com
Tue Sep 20 04:54:43 PDT 2016


As What we have done in commit fceef393a538 ("switch ->get_link()
to delayed_call, kill ->put_link()")

Signed-off-by: Kevin Hao <kexin.hao at windriver.com>
---
 fs/yaffs2/yaffs_vfs.c | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/fs/yaffs2/yaffs_vfs.c b/fs/yaffs2/yaffs_vfs.c
index b57d612808de..f3efeb0ad4e0 100644
--- a/fs/yaffs2/yaffs_vfs.c
+++ b/fs/yaffs2/yaffs_vfs.c
@@ -1060,7 +1060,7 @@ static int yaffs_readlink(struct dentry *dentry, char __user * buffer,
 
 #if (YAFFS_NEW_FOLLOW_LINK == 1)
 static const char *yaffs_get_link(struct dentry *dentry, struct inode *inode,
-				  void **cookie)
+				  struct delayed_call *done)
 {
 	void *ret;
 #else
@@ -1086,7 +1086,7 @@ static int yaffs_follow_link(struct dentry *dentry, struct nameidata *nd)
 		goto out;
 	}
 #if (YAFFS_NEW_FOLLOW_LINK == 1)
-	*cookie = alias;
+	set_delayed_call(done, kfree_link, alias);
 	ret = alias;
 out:
 	if (ret_int)
@@ -1117,18 +1117,10 @@ static void yaffs_put_inode(struct inode *inode)
 }
 #endif
 
-#if (YAFFS_NEW_FOLLOW_LINK == 1)
-void yaffs_put_link(struct inode *inode, void *cookie)
-{
-	kfree(cookie);
-}
-#endif
-
 static const struct inode_operations yaffs_symlink_inode_operations = {
 	.readlink = yaffs_readlink,
 #if (YAFFS_NEW_FOLLOW_LINK == 1)
 	.get_link = yaffs_get_link,
-	.put_link = yaffs_put_link,
 #else
 	.follow_link = yaffs_follow_link,
 #endif
-- 
2.9.3



More information about the poky mailing list