blob: 2b8541a7fc43d0bfdb9241594422046d699f11fc [file] [log] [blame]
Mike Marshall1182fca2015-07-17 10:38:15 -04001/*
2 * (C) 2001 Clemson University and The University of Chicago
3 *
4 * See COPYING in top-level directory.
5 */
6
7#include "protocol.h"
Mike Marshall575e9462015-12-04 12:56:14 -05008#include "orangefs-kernel.h"
9#include "orangefs-bufmap.h"
Mike Marshall1182fca2015-07-17 10:38:15 -040010
Yi Liu8bb8aef2015-11-24 15:12:14 -050011static const char *orangefs_follow_link(struct dentry *dentry, void **cookie)
Mike Marshall1182fca2015-07-17 10:38:15 -040012{
Yi Liu8bb8aef2015-11-24 15:12:14 -050013 char *target = ORANGEFS_I(dentry->d_inode)->link_target;
Mike Marshall1182fca2015-07-17 10:38:15 -040014
15 gossip_debug(GOSSIP_INODE_DEBUG,
16 "%s: called on %s (target is %p)\n",
17 __func__, (char *)dentry->d_name.name, target);
18
19 *cookie = target;
20
21 return target;
22}
23
Yi Liu8bb8aef2015-11-24 15:12:14 -050024struct inode_operations orangefs_symlink_inode_operations = {
Mike Marshall1182fca2015-07-17 10:38:15 -040025 .readlink = generic_readlink,
Yi Liu8bb8aef2015-11-24 15:12:14 -050026 .follow_link = orangefs_follow_link,
27 .setattr = orangefs_setattr,
28 .getattr = orangefs_getattr,
29 .listxattr = orangefs_listxattr,
Mike Marshall1182fca2015-07-17 10:38:15 -040030 .setxattr = generic_setxattr,
Martin Brandenburg933287d2016-01-30 13:46:54 -050031 .permission = orangefs_permission,
Mike Marshall1182fca2015-07-17 10:38:15 -040032};