scoutfs: used locked getattr for all inodes

We only set the .getattr method to our locked getattr filler for regular
files.  Set it for all files so that stat, etc, will see the current
inode for all file types.

Signed-off-by: Zach Brown <zab@versity.com>
This commit is contained in:
Zach Brown
2017-10-12 14:51:30 -07:00
committed by Mark Fasheh
parent a30f0bf82f
commit 856f257085
3 changed files with 7 additions and 4 deletions
+2
View File
@@ -986,6 +986,7 @@ const struct inode_operations scoutfs_symlink_iops = {
.readlink = generic_readlink,
.follow_link = scoutfs_follow_link,
.put_link = scoutfs_put_link,
.getattr = scoutfs_getattr,
.setxattr = scoutfs_setxattr,
.getxattr = scoutfs_getxattr,
.listxattr = scoutfs_listxattr,
@@ -1637,6 +1638,7 @@ const struct inode_operations scoutfs_dir_iops = {
.unlink = scoutfs_unlink,
.rmdir = scoutfs_unlink,
.rename = scoutfs_rename,
.getattr = scoutfs_getattr,
.setxattr = scoutfs_setxattr,
.getxattr = scoutfs_getxattr,
.listxattr = scoutfs_listxattr,
+3 -4
View File
@@ -66,8 +66,6 @@ struct inode_sb_info {
struct inode_sb_info *name = SCOUTFS_SB(sb)->inode_sb_info
static struct kmem_cache *scoutfs_inode_cachep;
static int scoutfs_getattr(struct vfsmount *mnt, struct dentry *dentry,
struct kstat *stat);
/*
* This is called once before all the allocations and frees of a inode
@@ -162,6 +160,7 @@ static const struct inode_operations scoutfs_file_iops = {
};
static const struct inode_operations scoutfs_special_iops = {
.getattr = scoutfs_getattr,
.setxattr = scoutfs_setxattr,
.getxattr = scoutfs_getxattr,
.listxattr = scoutfs_listxattr,
@@ -309,8 +308,8 @@ void scoutfs_inode_init_key(struct scoutfs_key_buf *key,
scoutfs_key_init(key, ikey, sizeof(struct scoutfs_inode_key));
}
static int scoutfs_getattr(struct vfsmount *mnt, struct dentry *dentry,
struct kstat *stat)
int scoutfs_getattr(struct vfsmount *mnt, struct dentry *dentry,
struct kstat *stat)
{
struct inode *inode = dentry->d_inode;
struct super_block *sb = inode->i_sb;
+2
View File
@@ -93,6 +93,8 @@ u64 scoutfs_inode_data_version(struct inode *inode);
int scoutfs_inode_refresh(struct inode *inode, struct scoutfs_lock *lock,
int flags);
int scoutfs_getattr(struct vfsmount *mnt, struct dentry *dentry,
struct kstat *stat);
int scoutfs_scan_orphans(struct super_block *sb);