new ->follow_link() and ->put_link() calling conventions
[deliverable/linux.git] / fs / f2fs / namei.c
index 658e8079aaf9b9020068bd30aad723d168899309..d2947937515eedce54ac756a3e21080b7deeb143 100644 (file)
@@ -296,19 +296,15 @@ fail:
        return err;
 }
 
-static void *f2fs_follow_link(struct dentry *dentry, struct nameidata *nd)
+static const char *f2fs_follow_link(struct dentry *dentry, void **cookie, struct nameidata *nd)
 {
-       struct page *page = page_follow_link_light(dentry, nd);
-
-       if (IS_ERR_OR_NULL(page))
-               return page;
-
-       /* this is broken symlink case */
-       if (*nd_get_link(nd) == 0) {
-               page_put_link(dentry, nd, page);
-               return ERR_PTR(-ENOENT);
+       const char *link = page_follow_link_light(dentry, cookie, nd);
+       if (!IS_ERR(link) && !*link) {
+               /* this is broken symlink case */
+               page_put_link(dentry, *cookie);
+               link = ERR_PTR(-ENOENT);
        }
-       return page;
+       return link;
 }
 
 static int f2fs_symlink(struct inode *dir, struct dentry *dentry,
This page took 0.027391 seconds and 5 git commands to generate.