AFS_GUNLOCK();
if (code < 0) {
- goto out;
+ return code;
}
name[code] = '\0';
- code = vfs_follow_link(nd, name);
-
-out:
- osi_Free(name, PATH_MAX);
+ nd_set_link(nd, name);
+ return 0;
+}
- return code;
+static int
+afs_linux_put_link(struct dentry *dentry, struct nameidata *nd)
+{
+ char *name = nd_get_link(nd);
+ if (name && !IS_ERR(name)) {
+ osi_Free(name, PATH_MAX);
+ }
}
#endif /* USABLE_KERNEL_PAGE_SYMLINK_CACHE */
#else /* !defined(USABLE_KERNEL_PAGE_SYMLINK_CACHE) */
.readlink = afs_linux_readlink,
.follow_link = afs_linux_follow_link,
+ .put_link = afs_linux_put_link,
#endif /* USABLE_KERNEL_PAGE_SYMLINK_CACHE */
.setattr = afs_notify_change,
};