2015-07-17 22:38:15 +08:00
|
|
|
/*
|
|
|
|
* (C) 2001 Clemson University and The University of Chicago
|
|
|
|
*
|
|
|
|
* See COPYING in top-level directory.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "protocol.h"
|
2015-12-05 01:56:14 +08:00
|
|
|
#include "orangefs-kernel.h"
|
|
|
|
#include "orangefs-bufmap.h"
|
2015-07-17 22:38:15 +08:00
|
|
|
|
2015-11-25 04:12:14 +08:00
|
|
|
static const char *orangefs_follow_link(struct dentry *dentry, void **cookie)
|
2015-07-17 22:38:15 +08:00
|
|
|
{
|
2015-11-25 04:12:14 +08:00
|
|
|
char *target = ORANGEFS_I(dentry->d_inode)->link_target;
|
2015-07-17 22:38:15 +08:00
|
|
|
|
|
|
|
gossip_debug(GOSSIP_INODE_DEBUG,
|
|
|
|
"%s: called on %s (target is %p)\n",
|
|
|
|
__func__, (char *)dentry->d_name.name, target);
|
|
|
|
|
|
|
|
*cookie = target;
|
|
|
|
|
|
|
|
return target;
|
|
|
|
}
|
|
|
|
|
2015-11-25 04:12:14 +08:00
|
|
|
struct inode_operations orangefs_symlink_inode_operations = {
|
2015-07-17 22:38:15 +08:00
|
|
|
.readlink = generic_readlink,
|
2015-11-25 04:12:14 +08:00
|
|
|
.follow_link = orangefs_follow_link,
|
|
|
|
.setattr = orangefs_setattr,
|
|
|
|
.getattr = orangefs_getattr,
|
|
|
|
.listxattr = orangefs_listxattr,
|
2015-07-17 22:38:15 +08:00
|
|
|
.setxattr = generic_setxattr,
|
|
|
|
};
|