X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Finclude%2Flinux%2Flustre_smfs.h;h=b51d628ad2317b08dc54b638be205a250640887c;hb=289e9caabec18e07df40f206b1000d91d9e305d7;hp=710569ca64ae868b29d87013960f7c7a116824ab;hpb=d3a0b3d00a7e14c5918880da43bd420fd8f01198;p=fs%2Flustre-release.git diff --git a/lustre/include/linux/lustre_smfs.h b/lustre/include/linux/lustre_smfs.h index 710569c..b51d628 100644 --- a/lustre/include/linux/lustre_smfs.h +++ b/lustre/include/linux/lustre_smfs.h @@ -72,7 +72,7 @@ struct mds_kml_pack_info { 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; @@ -324,8 +324,10 @@ static inline void post_smfs_inode(struct inode *inode, 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 */ @@ -412,15 +414,11 @@ static inline void smfs_free_dentry_name(struct qstr *str) 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)