us_manager: remove old dentry manipulation interface 32/191032/5
authorVyacheslav Cherkashin <v.cherkashin@samsung.com>
Mon, 1 Oct 2018 10:27:35 +0000 (13:27 +0300)
committerVyacheslav Cherkashin <v.cherkashin@samsung.com>
Fri, 12 Oct 2018 13:05:31 +0000 (16:05 +0300)
Change-Id: Ib68a78ecc5f97bdfb9cc6f8ec022af6dc3350179
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
modules/us_manager/pf/pf_group.c
modules/us_manager/pf/pf_group.h
modules/us_manager/us_common_file.h [deleted file]

index 26684ff5d31ad3b3b7683a1eeaf1e76c19c40f73..be90f3c296be29c23bd23b3ecb354a42a1bbc592 100644 (file)
@@ -43,7 +43,6 @@
 #include <us_manager/img/img_ip.h>
 #include <us_manager/sspt/sspt_proc.h>
 #include <us_manager/helper.h>
-#include <us_manager/us_common_file.h>
 #include <task_ctx/task_ctx.h>
 #include <kprobe/swap_ktd.h>
 
@@ -276,25 +275,6 @@ static void subsequent_install(struct task_struct *task,
 }
 
 
-/**
- * @brief Get dentry struct by path
- *
- * @param path Path to file
- * @return Pointer on dentry struct on NULL
- */
-struct dentry *dentry_by_path(const char *path)
-{
-       struct dentry *d;
-
-       d = swap_get_dentry(path);
-       if (d)
-               dput(d);
-
-       return d;
-}
-EXPORT_SYMBOL_GPL(dentry_by_path);
-
-
 int pfg_msg_cb_set(struct pf_group *pfg, struct pfg_msg_cb *msg_cb)
 {
        if (pfg->msg_cb)
index f5267aa36fdf77e5925455f74a5f3495dcc0df7c..01749b91b46fa54220d045979529f65917075173 100644 (file)
@@ -43,9 +43,6 @@ struct pfg_msg_cb {
 };
 
 
-/* FIXME: use swap_get_dentry() and swap_put_dentry() */
-struct dentry *dentry_by_path(const char *path);
-
 struct pf_group *get_pf_group_by_dentry(struct dentry *dentry, void *priv);
 struct pf_group *get_pf_group_by_tgid(pid_t tgid, void *priv);
 struct pf_group *get_pf_group_by_comm(char *comm, void *priv);
diff --git a/modules/us_manager/us_common_file.h b/modules/us_manager/us_common_file.h
deleted file mode 100644 (file)
index f18b6ce..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- *  SWAP uprobe manager
- *  modules/us_manager/us_manager_common_file.h
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * Copyright (C) Samsung Electronics, 2017
- *
- * 2017         Alexander Aksenov: SWAP us_manager implement
- *
- */
-
-#ifndef __US_MANAGER_COMMON_FILE_H__
-#define __US_MANAGER_COMMON_FILE_H__
-
-#include <linux/dcache.h>
-#include <linux/namei.h>
-
-static inline struct dentry *swap_get_dentry(const char *filepath)
-{
-       struct path path;
-       struct dentry *dentry = NULL;
-
-       if (kern_path(filepath, LOOKUP_FOLLOW, &path) == 0) {
-               dentry = dget(path.dentry);
-               path_put(&path);
-       }
-
-       return dentry;
-}
-
-static inline void swap_put_dentry(struct dentry *dentry)
-{
-       dput(dentry);
-}
-
-#endif /* __US_MANAGER_COMMON_FILE_H__ */