Merge tag 'nfsd-5.10' of git://linux-nfs.org/~bfields/linux
[sfrench/cifs-2.6.git] / net / sunrpc / cache.c
index baef5ee43dbbdb3fbc9b5bdf780a585e8d877404..20c93b68505e6d21481fe8affa6adfbd2ad7bf49 100644 (file)
@@ -498,16 +498,17 @@ static int cache_clean(void)
  */
 static void do_cache_clean(struct work_struct *work)
 {
-       int delay = 5;
-       if (cache_clean() == -1)
-               delay = round_jiffies_relative(30*HZ);
+       int delay;
 
        if (list_empty(&cache_list))
-               delay = 0;
+               return;
+
+       if (cache_clean() == -1)
+               delay = round_jiffies_relative(30*HZ);
+       else
+               delay = 5;
 
-       if (delay)
-               queue_delayed_work(system_power_efficient_wq,
-                                  &cache_cleaner, delay);
+       queue_delayed_work(system_power_efficient_wq, &cache_cleaner, delay);
 }
 
 
@@ -908,7 +909,7 @@ static ssize_t cache_do_downcall(char *kaddr, const char __user *buf,
 static ssize_t cache_slow_downcall(const char __user *buf,
                                   size_t count, struct cache_detail *cd)
 {
-       static char write_buf[8192]; /* protected by queue_io_mutex */
+       static char write_buf[32768]; /* protected by queue_io_mutex */
        ssize_t ret = -EINVAL;
 
        if (count >= sizeof(write_buf))
@@ -1436,10 +1437,10 @@ static int c_show(struct seq_file *m, void *p)
        cache_get(cp);
        if (cache_check(cd, cp, NULL))
                /* cache_check does a cache_put on failure */
-               seq_printf(m, "# ");
+               seq_puts(m, "# ");
        else {
                if (cache_is_expired(cd, cp))
-                       seq_printf(m, "# ");
+                       seq_puts(m, "# ");
                cache_put(cp, cd);
        }