]> git.karo-electronics.de Git - karo-tx-linux.git/blob - fs/orangefs/symlink.c
Merge remote-tracking branch 'thermal-soc/next'
[karo-tx-linux.git] / fs / orangefs / symlink.c
1 /*
2  * (C) 2001 Clemson University and The University of Chicago
3  *
4  * See COPYING in top-level directory.
5  */
6
7 #include "protocol.h"
8 #include "orangefs-kernel.h"
9 #include "orangefs-bufmap.h"
10
11 static const char *orangefs_get_link(struct dentry *dentry, struct inode *inode,
12                                      struct delayed_call *done)
13 {
14         char *target;
15
16         if (!dentry)
17                 return ERR_PTR(-ECHILD);
18
19         target =  ORANGEFS_I(dentry->d_inode)->link_target;
20
21         gossip_debug(GOSSIP_INODE_DEBUG,
22                      "%s: called on %s (target is %p)\n",
23                      __func__, (char *)dentry->d_name.name, target);
24
25         return target;
26 }
27
28 struct inode_operations orangefs_symlink_inode_operations = {
29         .readlink = generic_readlink,
30         .get_link = orangefs_get_link,
31         .setattr = orangefs_setattr,
32         .getattr = orangefs_getattr,
33         .listxattr = orangefs_listxattr,
34         .setxattr = generic_setxattr,
35         .permission = orangefs_permission,
36 };