1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
From 80aab05debcd3ee129f8ee68df08e8236bf0a3a6 Mon Sep 17 00:00:00 2001
From: Kevin Hao <kexin.hao@windriver.com>
Date: Tue, 20 Sep 2016 19:54:43 +0800
Subject: [PATCH 4/5] fs: yaffs2: kill ->put_link()
As What we have done in commit fceef393a538 ("switch ->get_link()
to delayed_call, kill ->put_link()")
Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@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.5.0
|