mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
orangefs: Implement inode_operations->permission().
Thus d_revalidate is not obliged to check on as much, which will eventually lead the way to hammering the filesystem servers much less. Signed-off-by: Martin Brandenburg <martin@omnibond.com> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
This commit is contained in:
parent
fe88adc366
commit
933287da75
6 changed files with 34 additions and 1 deletions
|
@ -291,6 +291,24 @@ int orangefs_getattr(struct vfsmount *mnt,
|
|||
return ret;
|
||||
}
|
||||
|
||||
int orangefs_permission(struct inode *inode, int mask)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if (mask & MAY_NOT_BLOCK)
|
||||
return -ECHILD;
|
||||
|
||||
gossip_debug(GOSSIP_INODE_DEBUG, "%s: refreshing\n", __func__);
|
||||
|
||||
/* Make sure the permission (and other common attrs) are up to date. */
|
||||
ret = orangefs_inode_getattr(inode,
|
||||
ORANGEFS_ATTR_SYS_ALL_NOHINT_NOSIZE, 0);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
return generic_permission(inode, mask);
|
||||
}
|
||||
|
||||
/* ORANGEDS2 implementation of VFS inode operations for files */
|
||||
struct inode_operations orangefs_file_inode_operations = {
|
||||
.get_acl = orangefs_get_acl,
|
||||
|
@ -301,6 +319,7 @@ struct inode_operations orangefs_file_inode_operations = {
|
|||
.getxattr = generic_getxattr,
|
||||
.listxattr = orangefs_listxattr,
|
||||
.removexattr = generic_removexattr,
|
||||
.permission = orangefs_permission,
|
||||
};
|
||||
|
||||
static int orangefs_init_iops(struct inode *inode)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue