summaryrefslogtreecommitdiff
path: root/fs/orangefs/symlink.c
diff options
context:
space:
mode:
authorMike Marshall <hubcap@omnibond.com>2015-07-17 10:38:15 -0400
committerMike Marshall <hubcap@omnibond.com>2015-10-03 11:39:57 -0400
commit1182fca3bc00441d5b2dee2f0548a3b7f978f9e7 (patch)
treee33ca6e48fdbb2e64671b0c7bfc4a230868bb51b /fs/orangefs/symlink.c
parentf7be4ee07fb72a516563bc2870ef41fa589a964a (diff)
Orangefs: kernel client part 5
Signed-off-by: Mike Marshall <hubcap@omnibond.com>
Diffstat (limited to 'fs/orangefs/symlink.c')
-rw-r--r--fs/orangefs/symlink.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/fs/orangefs/symlink.c b/fs/orangefs/symlink.c
new file mode 100644
index 000000000000..2adfceff7730
--- /dev/null
+++ b/fs/orangefs/symlink.c
@@ -0,0 +1,31 @@
+/*
+ * (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"
+
+static const char *pvfs2_follow_link(struct dentry *dentry, void **cookie)
+{
+ char *target = PVFS2_I(dentry->d_inode)->link_target;
+
+ gossip_debug(GOSSIP_INODE_DEBUG,
+ "%s: called on %s (target is %p)\n",
+ __func__, (char *)dentry->d_name.name, target);
+
+ *cookie = target;
+
+ return target;
+}
+
+struct inode_operations pvfs2_symlink_inode_operations = {
+ .readlink = generic_readlink,
+ .follow_link = pvfs2_follow_link,
+ .setattr = pvfs2_setattr,
+ .getattr = pvfs2_getattr,
+ .listxattr = pvfs2_listxattr,
+ .setxattr = generic_setxattr,
+};