#include <us_manager/sspt/sspt_file.h>
#include <us_manager/sspt/sspt_ip.h>
#include <us_manager/probes/probe_info_new.h>
-#include <us_manager/us_common_file.h>
+#include <us_manager/swap_dcache.h>
#include <loader/loader.h>
#include <master/swap_initializer.h>
#include "gt.h"
put_pf_group(l_probe->pfg);
if (l_probe->task_id == GT_SET_BY_DENTRY && l_probe->dentry != NULL)
- swap_put_dentry(l_probe->dentry);
+ swap_dput(l_probe->dentry);
if (l_probe->task_id == GT_SET_BY_ID && l_probe->id != NULL)
kfree(l_probe->id);
{
struct dentry *dentry;
- dentry = swap_get_dentry(path);
+ dentry = swap_dget_by_path(path);
if (dentry == NULL)
return -EINVAL;
- /* We use get_dentry only once, so use put dentry also only once */
- if (_linker_fixup.dentry != NULL ||
- _linker_reloc.dentry != NULL) {
- if (_linker_fixup.dentry != NULL)
- swap_put_dentry(_linker_fixup.dentry);
- else
- swap_put_dentry(_linker_reloc.dentry);
- }
-
+ /* update fixup dentry */
+ swap_dput(_linker_fixup.dentry);
_linker_fixup.dentry = dentry;
- _linker_reloc.dentry = dentry;
+
+ /* update reloc dentry */
+ swap_dput(_linker_reloc.dentry);
+ _linker_reloc.dentry = swap_dget(dentry);
return 0;
}
struct l_probe_el *l_probe;
int ret;
- dentry = swap_get_dentry(path);
+ dentry = swap_dget_by_path(path);
if (dentry == NULL)
return -EINVAL;
put_pf_group(pfg);
add_by_path_put_dentry:
- swap_put_dentry(dentry);
+ swap_dput(dentry);
return ret;
}
struct dentry *dentry;
int ret = 0;
- dentry = swap_get_dentry(path);
+ dentry = swap_dget_by_path(path);
if (dentry == NULL)
return -EINVAL;
struct dentry *dentry;
int ret;
- /* We use get_dentry only once, so use put dentry also only once */
- dentry = swap_get_dentry(path);
+ dentry = swap_dget_by_path(path);
if (dentry == NULL)
return -EINVAL;
- if (_handler_fixup.dentry)
- swap_put_dentry(_handler_fixup.dentry);
-
- if (_handler_reloc.dentry)
- swap_put_dentry(_handler_reloc.dentry);
-
+ /* update fixup dentry */
+ swap_dput(_handler_fixup.dentry);
_handler_fixup.dentry = dentry;
- _handler_reloc.dentry = dentry;
+
+ /* update reloc dentry */
+ swap_dput(_handler_reloc.dentry);
+ _handler_reloc.dentry = swap_dget(dentry);
/* TODO Do smth with this:
* make interface for loader to remove handlers
{
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;
_clean_linker_probes();
- /* We use get_dentry only once, so use put dentry also only once */
- if (_handler_fixup.dentry != NULL ||
- _handler_reloc.dentry != NULL) {
- if (_handler_fixup.dentry != NULL)
- swap_put_dentry(_handler_fixup.dentry);
- else
- swap_put_dentry(_handler_reloc.dentry);
- _handler_reloc.dentry = NULL;
- _handler_fixup.dentry = NULL;
- }
+ swap_dput(_handler_fixup.dentry);
+ _handler_fixup.dentry = NULL;
+
+ swap_dput(_handler_reloc.dentry);
+ _handler_reloc.dentry = NULL;
}
SWAP_LIGHT_INIT_MODULE(NULL, gtm_init, gtm_exit, NULL, NULL);