diff options
author | Andrew Morton <akpm@linux-foundation.org> | 2015-06-24 19:54:56 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-06-24 20:49:39 -0400 |
commit | e327284abb8aee3206cef3b790a283fea213a174 (patch) | |
tree | c6c5ee017e368ae056e567d11b867776411e9d54 | |
parent | 7c2bd2f930aefbc93b90140fa37fa2547728c84c (diff) |
ocfs2: remove __mlog_cpu_guess
raw_smp_processor_id() is the means of avoiding the runtime preemptibility
check.
[akpm@linux-foundation.org: fix printk warning]
Cc: Joe Perches <joe@perches.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Mark Fasheh <mfasheh@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | fs/ocfs2/cluster/masklog.c | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/fs/ocfs2/cluster/masklog.c b/fs/ocfs2/cluster/masklog.c index c2182ba1013c..dfe162f5fd4c 100644 --- a/fs/ocfs2/cluster/masklog.c +++ b/fs/ocfs2/cluster/masklog.c | |||
@@ -64,19 +64,6 @@ static ssize_t mlog_mask_store(u64 mask, const char *buf, size_t count) | |||
64 | return count; | 64 | return count; |
65 | } | 65 | } |
66 | 66 | ||
67 | /* | ||
68 | * smp_processor_id() "helpfully" screams when called outside preemptible | ||
69 | * regions in current kernels. sles doesn't have the variants that don't | ||
70 | * scream. just do this instead of trying to guess which we're building | ||
71 | * against.. *sigh*. | ||
72 | */ | ||
73 | #define __mlog_cpu_guess \ | ||
74 | ({ \ | ||
75 | unsigned long _cpu = get_cpu(); \ | ||
76 | put_cpu(); \ | ||
77 | _cpu; \ | ||
78 | }) | ||
79 | |||
80 | void __mlog_printk(const u64 *mask, const char *func, int line, | 67 | void __mlog_printk(const u64 *mask, const char *func, int line, |
81 | const char *fmt, ...) | 68 | const char *fmt, ...) |
82 | { | 69 | { |
@@ -103,9 +90,9 @@ void __mlog_printk(const u64 *mask, const char *func, int line, | |||
103 | vaf.fmt = fmt; | 90 | vaf.fmt = fmt; |
104 | vaf.va = &args; | 91 | vaf.va = &args; |
105 | 92 | ||
106 | printk("%s(%s,%u,%lu):%s:%d %s%pV", | 93 | printk("%s(%s,%u,%u):%s:%d %s%pV", |
107 | level, current->comm, task_pid_nr(current), __mlog_cpu_guess, | 94 | level, current->comm, task_pid_nr(current), |
108 | func, line, prefix, &vaf); | 95 | raw_smp_processor_id(), func, line, prefix, &vaf); |
109 | 96 | ||
110 | va_end(args); | 97 | va_end(args); |
111 | } | 98 | } |