Wrapfs: use generic put_link helper
authorErez Zadok <ezk@cs.sunysb.edu>
Wed, 27 Nov 2013 04:05:22 +0000 (23:05 -0500)
committerErez Zadok <ezk@cs.sunysb.edu>
Tue, 27 Dec 2016 03:53:16 +0000 (22:53 -0500)
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
fs/wrapfs/inode.c

index b02a1f6b5b8510d74d9522889584fe154448337d..8d1930341a5a7b9932781eeab5a1b211b257d091 100644 (file)
@@ -340,15 +340,6 @@ out:
        return NULL;
 }
 
-/* this @nd *IS* still used */
-static void wrapfs_put_link(struct dentry *dentry, struct nameidata *nd,
-                           void *cookie)
-{
-       char *buf = nd_get_link(nd);
-       if (!IS_ERR(buf))       /* free the char* */
-               kfree(buf);
-}
-
 static int wrapfs_permission(struct inode *inode, int mask)
 {
        struct inode *lower_inode;
@@ -463,7 +454,7 @@ const struct inode_operations wrapfs_symlink_iops = {
        .follow_link    = wrapfs_follow_link,
        .setattr        = wrapfs_setattr,
        .getattr        = wrapfs_getattr,
-       .put_link       = wrapfs_put_link,
+       .put_link       = kfree_put_link,
 };
 
 const struct inode_operations wrapfs_dir_iops = {