Merge branch 'for-linus-1' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
[deliverable/linux.git] / fs / hostfs / hostfs_kern.c
index 07d8d8f52faf50d027f2f90a1699c7afa274aa34..059597b23f677b0959d8264b83cf4c4a2cec34b7 100644 (file)
@@ -892,7 +892,7 @@ static const struct inode_operations hostfs_dir_iops = {
        .setattr        = hostfs_setattr,
 };
 
-static void *hostfs_follow_link(struct dentry *dentry, struct nameidata *nd)
+static const char *hostfs_follow_link(struct dentry *dentry, void **cookie)
 {
        char *link = __getname();
        if (link) {
@@ -906,21 +906,18 @@ static void *hostfs_follow_link(struct dentry *dentry, struct nameidata *nd)
                }
                if (err < 0) {
                        __putname(link);
-                       link = ERR_PTR(err);
+                       return ERR_PTR(err);
                }
        } else {
-               link = ERR_PTR(-ENOMEM);
+               return ERR_PTR(-ENOMEM);
        }
 
-       nd_set_link(nd, link);
-       return NULL;
+       return *cookie = link;
 }
 
-static void hostfs_put_link(struct dentry *dentry, struct nameidata *nd, void *cookie)
+static void hostfs_put_link(struct inode *unused, void *cookie)
 {
-       char *s = nd_get_link(nd);
-       if (!IS_ERR(s))
-               __putname(s);
+       __putname(cookie);
 }
 
 static const struct inode_operations hostfs_link_iops = {
This page took 0.040232 seconds and 5 git commands to generate.