diff options
author | Alexander Aksenov <a.aksenov@samsung.com> | 2015-09-08 19:10:02 +0300 |
---|---|---|
committer | Alexander Aksenov <a.aksenov@samsung.com> | 2015-09-12 13:28:55 +0300 |
commit | 4a570c9cadc6b6f213ced77bd4d22fa11a4cc4a1 (patch) | |
tree | 9b12c198b179dc5d96fc200a056b92c5da78b55c | |
parent | c53472b6a23ec8a39f1ed80ffe1b0bad262120ba (diff) | |
download | swap-modules-4a570c9cadc6b6f213ced77bd4d22fa11a4cc4a1.tar.gz swap-modules-4a570c9cadc6b6f213ced77bd4d22fa11a4cc4a1.tar.bz2 swap-modules-4a570c9cadc6b6f213ced77bd4d22fa11a4cc4a1.zip |
[FIX] Preload: sync in atomic
Mutex replaced with spinlock, cause they are used in
handlers (executed in atomic context)
Change-Id: I736f0ae284cc75f8197b8dabc2f837313c8b5553
Signed-off-by: Alexander Aksenov <a.aksenov@samsung.com>
-rw-r--r-- | preload/preload_debugfs.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/preload/preload_debugfs.c b/preload/preload_debugfs.c index caeb022d..c290f7af 100644 --- a/preload/preload_debugfs.c +++ b/preload/preload_debugfs.c @@ -4,7 +4,7 @@ #include <linux/fs.h> #include <linux/module.h> #include <linux/slab.h> -#include <linux/mutex.h> +#include <linux/spinlock.h> #include <linux/limits.h> #include <asm/uaccess.h> #include <master/swap_debugfs.h> @@ -35,23 +35,19 @@ struct loader_info { }; static struct dentry *preload_root; -static struct loader_info __loader_info = { - .path = NULL, - .offset = 0, - .dentry = NULL -}; +static struct loader_info __loader_info; static unsigned long r_debug_offset = 0; -static DEFINE_MUTEX(__dentry_lock); +static DEFINE_SPINLOCK(__dentry_lock); static inline void dentry_lock(void) { - mutex_lock(&__dentry_lock); + spin_lock(&__dentry_lock); } static inline void dentry_unlock(void) { - mutex_unlock(&__dentry_lock); + spin_unlock(&__dentry_lock); } |