int mpi_size[4];
int mpi_total_size;
};
-typedef int (*smfs_hook_func)(struct inode *inode, struct dentry *dentry,
+typedef int (*smfs_hook_func)(struct inode *inode, void *dentry,
void *data1, void *data2, int op, void *handle);
struct smfs_hook_ops {
struct list_head smh_list;
static inline void pre_smfs_inode(struct inode *inode,
struct inode *cache_inode)
{
- if (inode && cache_inode)
- duplicate_inode(cache_inode, inode);
+ if (inode && cache_inode) {
+ cache_inode->i_state = inode->i_state;
+ // duplicate_inode(cache_inode, inode);
+ }
}
/* instantiate a file handle to the cache file */
static inline struct dentry *pre_smfs_dentry(struct dentry *parent_dentry,
struct inode *cache_inode,
- struct dentry *dentry,
- int *index)
+ struct dentry *dentry)
{
struct dentry *cache_dentry = NULL;
- struct qstr name;
- smfs_get_dentry_name_index(dentry, &name, index);
- cache_dentry = d_alloc(parent_dentry, &name);
- smfs_free_dentry_name(&name);
+ cache_dentry = d_alloc(parent_dentry, &dentry->d_name);
if (!cache_dentry)
RETURN(NULL);
if (!parent_dentry)