ceph: switch to simple_follow_link()
authorAl Viro <viro@zeniv.linux.org.uk>
Sat, 2 May 2015 14:50:05 +0000 (10:50 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Mon, 11 May 2015 02:18:28 +0000 (22:18 -0400)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/ceph/inode.c

index e876e1944519a330a2cc1f44e33a031139a35438..571acd88606cfcec3d01fc4a6ef453f0b49e9713 100644 (file)
@@ -6,7 +6,6 @@
 #include <linux/string.h>
 #include <linux/uaccess.h>
 #include <linux/kernel.h>
-#include <linux/namei.h>
 #include <linux/writeback.h>
 #include <linux/vmalloc.h>
 #include <linux/posix_acl.h>
@@ -819,6 +818,7 @@ static int fill_inode(struct inode *inode, struct page *locked_page,
                        else
                                kfree(sym); /* lost a race */
                }
+               inode->i_link = ci->i_symlink;
                break;
        case S_IFDIR:
                inode->i_op = &ceph_dir_iops;
@@ -1691,16 +1691,9 @@ retry:
 /*
  * symlinks
  */
-static void *ceph_sym_follow_link(struct dentry *dentry, struct nameidata *nd)
-{
-       struct ceph_inode_info *ci = ceph_inode(d_inode(dentry));
-       nd_set_link(nd, ci->i_symlink);
-       return NULL;
-}
-
 static const struct inode_operations ceph_symlink_iops = {
        .readlink = generic_readlink,
-       .follow_link = ceph_sym_follow_link,
+       .follow_link = simple_follow_link,
        .setattr = ceph_setattr,
        .getattr = ceph_getattr,
        .setxattr = ceph_setxattr,