symlink.c 758 字节
Newer Older
M
Mike Marshall 已提交
1 2 3 4 5 6 7 8 9 10
/*
 * (C) 2001 Clemson University and The University of Chicago
 *
 * See COPYING in top-level directory.
 */

#include "protocol.h"
#include "pvfs2-kernel.h"
#include "pvfs2-bufmap.h"

11
static const char *orangefs_follow_link(struct dentry *dentry, void **cookie)
M
Mike Marshall 已提交
12
{
13
	char *target =  ORANGEFS_I(dentry->d_inode)->link_target;
M
Mike Marshall 已提交
14 15 16 17 18 19 20 21 22 23

	gossip_debug(GOSSIP_INODE_DEBUG,
		     "%s: called on %s (target is %p)\n",
		     __func__, (char *)dentry->d_name.name, target);

	*cookie = target;

	return target;
}

24
struct inode_operations orangefs_symlink_inode_operations = {
M
Mike Marshall 已提交
25
	.readlink = generic_readlink,
26 27 28 29
	.follow_link = orangefs_follow_link,
	.setattr = orangefs_setattr,
	.getattr = orangefs_getattr,
	.listxattr = orangefs_listxattr,
M
Mike Marshall 已提交
30 31
	.setxattr = generic_setxattr,
};