{
struct dentry *dentry;
- dentry = get_dentry_by_pf(&pfg->filter);
+ dentry = (struct dentry *)get_pf_priv(&pfg->filter);
if (dentry == NULL) {
dentry = task->mm->exe_file ?
task->mm->exe_file->f_dentry :
}
/**
- * @brief Get dentry from pf_group struct if it filter by dentry
+ * @brief Get priv from pf_group struct
*
* @param filter Pointer to the proc_filter struct
- * @return Pointer to the dentry struct or NULL
+ * @return Pointer to the priv
*/
-struct dentry *get_dentry_by_pf(struct proc_filter *filter)
+void *get_pf_priv(struct proc_filter *filter)
{
- if (filter->call == &call_by_dentry)
- return (struct dentry *)filter->data;
-
- return NULL;
+ return filter->priv;
}
/* Check function for call_page_fault() and other frequently called
int check_pf_by_tgid(struct proc_filter *filter, pid_t tgid);
int check_pf_by_comm(struct proc_filter *filter, char *comm);
int check_pf_dumb(struct proc_filter *filter);
-struct dentry *get_dentry_by_pf(struct proc_filter *filter);
+void *get_pf_priv(struct proc_filter *filter);
void free_pf(struct proc_filter *filter);