Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 297269
b: refs/heads/master
c: 42be35d
h: refs/heads/master
i:
  297267: c76262c
v: v3
  • Loading branch information
Gilad Ben-Yossef authored and Linus Torvalds committed Mar 29, 2012
1 parent f21feac commit 15a8327
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a8364d5555b2030d093cde0f07951628e55454e1
refs/heads/master: 42be35d0390b966253136a285f507f5ad00fd9e8
15 changes: 14 additions & 1 deletion trunk/fs/buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -1384,10 +1384,23 @@ static void invalidate_bh_lru(void *arg)
}
put_cpu_var(bh_lrus);
}

static bool has_bh_in_lru(int cpu, void *dummy)
{
struct bh_lru *b = per_cpu_ptr(&bh_lrus, cpu);
int i;

for (i = 0; i < BH_LRU_SIZE; i++) {
if (b->bhs[i])
return 1;
}

return 0;
}

void invalidate_bh_lrus(void)
{
on_each_cpu(invalidate_bh_lru, NULL, 1);
on_each_cpu_cond(has_bh_in_lru, invalidate_bh_lru, NULL, 1, GFP_KERNEL);
}
EXPORT_SYMBOL_GPL(invalidate_bh_lrus);

Expand Down

0 comments on commit 15a8327

Please sign in to comment.