blob: 1b3ae63463dc5b48b77ddbec0553e8b53f7363a1 [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,
31};