506-yaffs2-using-new-follow_link-and-put_link.patch 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. From d4eb3ab036f8c37c5bc5f45ad0fa4dc34b7228c8 Mon Sep 17 00:00:00 2001
  2. From: Kevin Hao <kexin.hao@windriver.com>
  3. Date: Wed, 24 Feb 2016 14:37:13 +0800
  4. Subject: [PATCH 3/3] yaffs2: using new ->follow_link() and ->put_link()
  5. calling conventions
  6. As what we did in commit 680baacbca69 ("new ->follow_link() and
  7. ->put_link() calling conventions").
  8. Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
  9. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
  10. ---
  11. fs/yaffs2/yaffs_vfs.c | 8 ++++----
  12. 1 file changed, 4 insertions(+), 4 deletions(-)
  13. --- a/fs/yaffs2/yaffs_vfs.c
  14. +++ b/fs/yaffs2/yaffs_vfs.c
  15. @@ -1060,7 +1060,7 @@ static int yaffs_readlink(struct dentry
  16. }
  17. #if (YAFFS_NEW_FOLLOW_LINK == 1)
  18. -static void *yaffs_follow_link(struct dentry *dentry, struct nameidata *nd)
  19. +static const char *yaffs_follow_link(struct dentry *dentry, void **cookie)
  20. {
  21. void *ret;
  22. #else
  23. @@ -1082,7 +1082,7 @@ static int yaffs_follow_link(struct dent
  24. goto out;
  25. }
  26. #if (YAFFS_NEW_FOLLOW_LINK == 1)
  27. - nd_set_link(nd, alias);
  28. + *cookie = alias;
  29. ret = alias;
  30. out:
  31. if (ret_int)
  32. @@ -1114,9 +1114,9 @@ static void yaffs_put_inode(struct inode
  33. #endif
  34. #if (YAFFS_NEW_FOLLOW_LINK == 1)
  35. -void yaffs_put_link(struct dentry *dentry, struct nameidata *nd, void *alias)
  36. +void yaffs_put_link(struct inode *inode, void *cookie)
  37. {
  38. - kfree(alias);
  39. + kfree(cookie);
  40. }
  41. #endif