aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/cache.c
diff options
context:
space:
mode:
authorYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>2007-02-09 18:38:13 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2007-02-11 02:20:13 -0500
commitcca5172a7ec10dfdb0b787cd8e9d5b0b8f179793 (patch)
tree1b9e86cf95ab5e1e2b3180ebe59be2a05ebbe1bf /net/sunrpc/cache.c
parentd808ad9ab8b1109239027c248c4652503b9d3029 (diff)
[NET] SUNRPC: Fix whitespace errors.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sunrpc/cache.c')
-rw-r--r--net/sunrpc/cache.c64
1 files changed, 32 insertions, 32 deletions
diff --git a/net/sunrpc/cache.c b/net/sunrpc/cache.c
index 14274490f92e..c80df455802d 100644
--- a/net/sunrpc/cache.c
+++ b/net/sunrpc/cache.c
@@ -274,7 +274,7 @@ int cache_check(struct cache_detail *detail,
274 * 274 *
275 * A table is then only scanned if the current time is at least 275 * A table is then only scanned if the current time is at least
276 * the nextcheck time. 276 * the nextcheck time.
277 * 277 *
278 */ 278 */
279 279
280static LIST_HEAD(cache_list); 280static LIST_HEAD(cache_list);
@@ -296,16 +296,16 @@ void cache_register(struct cache_detail *cd)
296 struct proc_dir_entry *p; 296 struct proc_dir_entry *p;
297 cd->proc_ent->owner = cd->owner; 297 cd->proc_ent->owner = cd->owner;
298 cd->channel_ent = cd->content_ent = NULL; 298 cd->channel_ent = cd->content_ent = NULL;
299 299
300 p = create_proc_entry("flush", S_IFREG|S_IRUSR|S_IWUSR, 300 p = create_proc_entry("flush", S_IFREG|S_IRUSR|S_IWUSR,
301 cd->proc_ent); 301 cd->proc_ent);
302 cd->flush_ent = p; 302 cd->flush_ent = p;
303 if (p) { 303 if (p) {
304 p->proc_fops = &cache_flush_operations; 304 p->proc_fops = &cache_flush_operations;
305 p->owner = cd->owner; 305 p->owner = cd->owner;
306 p->data = cd; 306 p->data = cd;
307 } 307 }
308 308
309 if (cd->cache_request || cd->cache_parse) { 309 if (cd->cache_request || cd->cache_parse) {
310 p = create_proc_entry("channel", S_IFREG|S_IRUSR|S_IWUSR, 310 p = create_proc_entry("channel", S_IFREG|S_IRUSR|S_IWUSR,
311 cd->proc_ent); 311 cd->proc_ent);
@@ -316,16 +316,16 @@ void cache_register(struct cache_detail *cd)
316 p->data = cd; 316 p->data = cd;
317 } 317 }
318 } 318 }
319 if (cd->cache_show) { 319 if (cd->cache_show) {
320 p = create_proc_entry("content", S_IFREG|S_IRUSR|S_IWUSR, 320 p = create_proc_entry("content", S_IFREG|S_IRUSR|S_IWUSR,
321 cd->proc_ent); 321 cd->proc_ent);
322 cd->content_ent = p; 322 cd->content_ent = p;
323 if (p) { 323 if (p) {
324 p->proc_fops = &content_file_operations; 324 p->proc_fops = &content_file_operations;
325 p->owner = cd->owner; 325 p->owner = cd->owner;
326 p->data = cd; 326 p->data = cd;
327 } 327 }
328 } 328 }
329 } 329 }
330 rwlock_init(&cd->hash_lock); 330 rwlock_init(&cd->hash_lock);
331 INIT_LIST_HEAD(&cd->queue); 331 INIT_LIST_HEAD(&cd->queue);
@@ -417,15 +417,15 @@ static int cache_clean(void)
417 current_index++; 417 current_index++;
418 418
419 /* find a cleanable entry in the bucket and clean it, or set to next bucket */ 419 /* find a cleanable entry in the bucket and clean it, or set to next bucket */
420 420
421 if (current_detail && current_index < current_detail->hash_size) { 421 if (current_detail && current_index < current_detail->hash_size) {
422 struct cache_head *ch, **cp; 422 struct cache_head *ch, **cp;
423 struct cache_detail *d; 423 struct cache_detail *d;
424 424
425 write_lock(&current_detail->hash_lock); 425 write_lock(&current_detail->hash_lock);
426 426
427 /* Ok, now to clean this strand */ 427 /* Ok, now to clean this strand */
428 428
429 cp = & current_detail->hash_table[current_index]; 429 cp = & current_detail->hash_table[current_index];
430 ch = *cp; 430 ch = *cp;
431 for (; ch; cp= & ch->next, ch= *cp) { 431 for (; ch; cp= & ch->next, ch= *cp) {
@@ -477,9 +477,9 @@ static void do_cache_clean(struct work_struct *work)
477} 477}
478 478
479 479
480/* 480/*
481 * Clean all caches promptly. This just calls cache_clean 481 * Clean all caches promptly. This just calls cache_clean
482 * repeatedly until we are sure that every cache has had a chance to 482 * repeatedly until we are sure that every cache has had a chance to
483 * be fully cleaned 483 * be fully cleaned
484 */ 484 */
485void cache_flush(void) 485void cache_flush(void)
@@ -508,7 +508,7 @@ void cache_purge(struct cache_detail *detail)
508 * All deferred requests are stored in a hash table, 508 * All deferred requests are stored in a hash table,
509 * indexed by "struct cache_head *". 509 * indexed by "struct cache_head *".
510 * As it may be wasteful to store a whole request 510 * As it may be wasteful to store a whole request
511 * structure, we allow the request to provide a 511 * structure, we allow the request to provide a
512 * deferred form, which must contain a 512 * deferred form, which must contain a
513 * 'struct cache_deferred_req' 513 * 'struct cache_deferred_req'
514 * This cache_deferred_req contains a method to allow 514 * This cache_deferred_req contains a method to allow
@@ -584,7 +584,7 @@ static void cache_revisit_request(struct cache_head *item)
584 584
585 INIT_LIST_HEAD(&pending); 585 INIT_LIST_HEAD(&pending);
586 spin_lock(&cache_defer_lock); 586 spin_lock(&cache_defer_lock);
587 587
588 lp = cache_defer_hash[hash].next; 588 lp = cache_defer_hash[hash].next;
589 if (lp) { 589 if (lp) {
590 while (lp != &cache_defer_hash[hash]) { 590 while (lp != &cache_defer_hash[hash]) {
@@ -614,7 +614,7 @@ void cache_clean_deferred(void *owner)
614 614
615 INIT_LIST_HEAD(&pending); 615 INIT_LIST_HEAD(&pending);
616 spin_lock(&cache_defer_lock); 616 spin_lock(&cache_defer_lock);
617 617
618 list_for_each_entry_safe(dreq, tmp, &cache_defer_list, recent) { 618 list_for_each_entry_safe(dreq, tmp, &cache_defer_list, recent) {
619 if (dreq->owner == owner) { 619 if (dreq->owner == owner) {
620 list_del(&dreq->hash); 620 list_del(&dreq->hash);
@@ -639,7 +639,7 @@ void cache_clean_deferred(void *owner)
639 * On write, an update request is processed 639 * On write, an update request is processed
640 * Poll works if anything to read, and always allows write 640 * Poll works if anything to read, and always allows write
641 * 641 *
642 * Implemented by linked list of requests. Each open file has 642 * Implemented by linked list of requests. Each open file has
643 * a ->private that also exists in this list. New request are added 643 * a ->private that also exists in this list. New request are added
644 * to the end and may wakeup and preceding readers. 644 * to the end and may wakeup and preceding readers.
645 * New readers are added to the head. If, on read, an item is found with 645 * New readers are added to the head. If, on read, an item is found with
@@ -1059,10 +1059,10 @@ static int cache_make_upcall(struct cache_detail *detail, struct cache_head *h)
1059 * Messages are, like requests, separated into fields by 1059 * Messages are, like requests, separated into fields by
1060 * spaces and dequotes as \xHEXSTRING or embedded \nnn octal 1060 * spaces and dequotes as \xHEXSTRING or embedded \nnn octal
1061 * 1061 *
1062 * Message is 1062 * Message is
1063 * reply cachename expiry key ... content.... 1063 * reply cachename expiry key ... content....
1064 * 1064 *
1065 * key and content are both parsed by cache 1065 * key and content are both parsed by cache
1066 */ 1066 */
1067 1067
1068#define isodigit(c) (isdigit(c) && c <= '7') 1068#define isodigit(c) (isdigit(c) && c <= '7')
@@ -1132,7 +1132,7 @@ static void *c_start(struct seq_file *m, loff_t *pos)
1132 unsigned hash, entry; 1132 unsigned hash, entry;
1133 struct cache_head *ch; 1133 struct cache_head *ch;
1134 struct cache_detail *cd = ((struct handle*)m->private)->cd; 1134 struct cache_detail *cd = ((struct handle*)m->private)->cd;
1135 1135
1136 1136
1137 read_lock(&cd->hash_lock); 1137 read_lock(&cd->hash_lock);
1138 if (!n--) 1138 if (!n--)
@@ -1147,7 +1147,7 @@ static void *c_start(struct seq_file *m, loff_t *pos)
1147 do { 1147 do {
1148 hash++; 1148 hash++;
1149 n += 1LL<<32; 1149 n += 1LL<<32;
1150 } while(hash < cd->hash_size && 1150 } while(hash < cd->hash_size &&
1151 cd->hash_table[hash]==NULL); 1151 cd->hash_table[hash]==NULL);
1152 if (hash >= cd->hash_size) 1152 if (hash >= cd->hash_size)
1153 return NULL; 1153 return NULL;