summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-kernel/gentoo-sources/files/gentoo-sources-2.4.81106.patch')
-rw-r--r--sys-kernel/gentoo-sources/files/gentoo-sources-2.4.81106.patch18
1 files changed, 9 insertions, 9 deletions
diff --git a/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.81106.patch b/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.81106.patch
index 2cc0ab84ebb8..e58cc184ce4b 100644
--- a/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.81106.patch
+++ b/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.81106.patch
@@ -17,10 +17,10 @@ diff -Nru a/fs/ntfs/debug.c b/fs/ntfs/debug.c
+#include <linux/sched.h>
+
+/* minimum time in jiffies between messages */
-+int printk_ratelimit_jiffies = 5*HZ;
++int ntfs_debug_printk_ratelimit_jiffies = 5*HZ;
+
+/* number of messages we send before ratelimiting */
-+int printk_ratelimit_burst = 10;
++int ntfs_debug_printk_ratelimit_burst = 10;
+
+/*
+ * printk rate limiting, lifted from the networking subsystem.
@@ -29,7 +29,7 @@ diff -Nru a/fs/ntfs/debug.c b/fs/ntfs/debug.c
+ * every printk_ratelimit_jiffies to make a denial-of-service
+ * attack impossible.
+ */
-+int printk_ratelimit(void)
++int ntfs_debug_printk_ratelimit(void)
+{
+ static spinlock_t ratelimit_lock = SPIN_LOCK_UNLOCKED;
+ static unsigned long toks = 10*5*HZ;
@@ -41,12 +41,12 @@ diff -Nru a/fs/ntfs/debug.c b/fs/ntfs/debug.c
+ spin_lock_irqsave(&ratelimit_lock, flags);
+ toks += now - last_msg;
+ last_msg = now;
-+ if (toks > (printk_ratelimit_burst * printk_ratelimit_jiffies))
-+ toks = printk_ratelimit_burst * printk_ratelimit_jiffies;
-+ if (toks >= printk_ratelimit_jiffies) {
++ if (toks > (ntfs_debug_printk_ratelimit_burst * ntfs_debug_printk_ratelimit_jiffies))
++ toks = ntfs_debug_printk_ratelimit_burst * ntfs_debug_printk_ratelimit_jiffies;
++ if (toks >= ntfs_debug_printk_ratelimit_jiffies) {
+ int lost = missed;
+ missed = 0;
-+ toks -= printk_ratelimit_jiffies;
++ toks -= ntfs_debug_printk_ratelimit_jiffies;
+ spin_unlock_irqrestore(&ratelimit_lock, flags);
+ if (lost)
+ printk(KERN_WARNING "printk: %d messages suppressed.\n", lost);
@@ -64,7 +64,7 @@ diff -Nru a/fs/ntfs/debug.c b/fs/ntfs/debug.c
int flen = 0;
+#ifndef DEBUG
-+ if (!printk_ratelimit())
++ if (!ntfs_debug_printk_ratelimit())
+ return;
+#endif
if (function)
@@ -75,7 +75,7 @@ diff -Nru a/fs/ntfs/debug.c b/fs/ntfs/debug.c
int flen = 0;
+#ifndef DEBUG
-+ if (!printk_ratelimit())
++ if (!ntfs_debug_printk_ratelimit())
+ return;
+#endif
if (function)