#include <linux/mm.h>
#include <us_manager/sspt/sspt_ip.h>
-#include <us_manager/us_common_file.h>
+#include <us_manager/swap_dcache.h>
#include "preload.h"
#include "preload_module.h"
list_for_each_entry_safe(p, n, &rm_head, list) {
list_del(&p->list);
- swap_put_dentry(p->dentry);
+ swap_dput(p->dentry);
__free_binary(p);
}
}
int pc_add_instrumented_binary(char *filename)
{
- struct dentry *dentry = swap_get_dentry(filename);
+ struct dentry *dentry = swap_dget_by_path(filename);
int res = 0;
if (dentry == NULL)
res = __add_binary(dentry, filename, &target);
if (res != 0)
- swap_put_dentry(dentry);
+ swap_dput(dentry);
return res > 0 ? 0 : res;
}
int pc_add_ignored_binary(char *filename)
{
- struct dentry *dentry = swap_get_dentry(filename);
+ struct dentry *dentry = swap_dget_by_path(filename);
int res = 0;
if (dentry == NULL)
res = __add_binary(dentry, filename, &ignored);
if (res != 0)
- swap_put_dentry(dentry);
+ swap_dput(dentry);
return res > 0 ? 0 : res;
}
#include <us_manager/sspt/sspt_ip.h>
#include <us_manager/sspt/sspt_page.h>
#include <us_manager/sspt/sspt_file.h>
-#include <us_manager/us_common_file.h>
+#include <us_manager/swap_dcache.h>
#include <loader/loader.h>
#include <master/swap_initializer.h>
#include "preload.h"
rp->handler = preload_us_ret;
/* Get dentry and set it in probe info struct */
- dentry = swap_get_dentry(path);
+ dentry = swap_dget_by_path(path);
if (dentry == NULL) {
pr_warn(PRELOAD_PREFIX "Error! Cannot get handler %s\n", path);
return -EINVAL;
struct dentry *dentry = ip->desc->info.pl_i.dentry;
WARN_ON(!dentry);
-
- if (dentry)
- swap_put_dentry(dentry);
+ swap_dput(dentry);
}
int pm_switch(enum preload_status stat)
#include <linux/mutex.h>
#include <linux/namei.h>
#include <linux/slab.h>
-#include <us_manager/us_common_file.h>
+#include <us_manager/swap_dcache.h>
#include <us_manager/pf/pf_group.h>
#include <us_manager/sspt/sspt_page.h>
#include <us_manager/sspt/sspt_file.h>
put_pf_group(proc->pfg);
if (proc->idt == SET_BY_PATH)
- swap_put_dentry(proc->dentry);
+ swap_dput(proc->dentry);
if (proc->idt == SET_BY_ID)
kfree(proc->id);
struct process_t *proc;
int ret;
- dentry = swap_get_dentry(path);
+ dentry = swap_dget_by_path(path);
if (!dentry) {
pr_warn(PRELOAD_PREFIX "Can't get dentry for <%s>\n", path);
return -EINVAL;
put_pf_group(pfg);
by_path_put_dentry:
- swap_put_dentry(dentry);
+ swap_dput(dentry);
return ret;
}
{
struct dentry *dentry;
- dentry = swap_get_dentry(path);
+ dentry = swap_dget_by_path(path);
if (!dentry) {
pr_warn(PRELOAD_PREFIX "No dentry for <%s>\n", path);
return -EINVAL;
_delete_from_list(_check_by_dentry, dentry);
- swap_put_dentry(dentry);
+ swap_dput(dentry);
return 0;
}
{
struct dentry *dentry;
- dentry = swap_get_dentry(path);
+ dentry = swap_dget_by_path(path);
if (dentry == NULL)
return -EINVAL;
- if (_pthread_init.dentry != NULL)
- swap_put_dentry(_pthread_init.dentry);
-
+ swap_dput(_pthread_init.dentry);
_pthread_init.dentry = dentry;
return 0;