提交 a7d3e78a 编写于 作者: M Mike Marshall

Orangefs: follow_link -> get_link change

Signed-off-by: NMike Marshall <hubcap@omnibond.com>
上级 53f57fef
...@@ -268,17 +268,15 @@ int orangefs_getattr(struct vfsmount *mnt, ...@@ -268,17 +268,15 @@ int orangefs_getattr(struct vfsmount *mnt,
"orangefs_getattr: called on %s\n", "orangefs_getattr: called on %s\n",
dentry->d_name.name); dentry->d_name.name);
/*
* Similar to the above comment, a getattr also expects that all
* fields/attributes of the inode would be refreshed. So again, we
* dont have too much of a choice but refresh all the attributes.
*/
ret = orangefs_inode_getattr(inode, ORANGEFS_ATTR_SYS_ALL_NOHINT, 0); ret = orangefs_inode_getattr(inode, ORANGEFS_ATTR_SYS_ALL_NOHINT, 0);
if (ret == 0) { if (ret == 0) {
generic_fillattr(inode, kstat); generic_fillattr(inode, kstat);
/* override block size reported to stat */ /* override block size reported to stat */
orangefs_inode = ORANGEFS_I(inode); orangefs_inode = ORANGEFS_I(inode);
kstat->blksize = orangefs_inode->blksize; kstat->blksize = orangefs_inode->blksize;
inode->i_link = ORANGEFS_I(dentry->d_inode)->link_target;
} else { } else {
/* assume an I/O error and flag inode as bad */ /* assume an I/O error and flag inode as bad */
gossip_debug(GOSSIP_INODE_DEBUG, gossip_debug(GOSSIP_INODE_DEBUG,
......
...@@ -8,22 +8,9 @@ ...@@ -8,22 +8,9 @@
#include "orangefs-kernel.h" #include "orangefs-kernel.h"
#include "orangefs-bufmap.h" #include "orangefs-bufmap.h"
static const char *orangefs_follow_link(struct dentry *dentry, void **cookie)
{
char *target = ORANGEFS_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 orangefs_symlink_inode_operations = { struct inode_operations orangefs_symlink_inode_operations = {
.readlink = generic_readlink, .readlink = generic_readlink,
.follow_link = orangefs_follow_link, .get_link = simple_get_link,
.setattr = orangefs_setattr, .setattr = orangefs_setattr,
.getattr = orangefs_getattr, .getattr = orangefs_getattr,
.listxattr = orangefs_listxattr, .listxattr = orangefs_listxattr,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册