aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-03-28 20:19:27 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-03-28 20:19:28 -0400
commit532bfc851a7475fb6a36c1e953aa395798a7cca7 (patch)
treea7892e5a31330dd59f31959efbe9fda1803784fd /fs
parent0195c00244dc2e9f522475868fa278c473ba7339 (diff)
parent8da00edc1069f01c34510fa405dc15d96c090a3f (diff)
Merge branch 'akpm' (Andrew's patch-bomb)
Merge third batch of patches from Andrew Morton: - Some MM stragglers - core SMP library cleanups (on_each_cpu_mask) - Some IPI optimisations - kexec - kdump - IPMI - the radix-tree iterator work - various other misc bits. "That'll do for -rc1. I still have ~10 patches for 3.4, will send those along when they've baked a little more." * emailed from Andrew Morton <akpm@linux-foundation.org>: (35 commits) backlight: fix typo in tosa_lcd.c crc32: add help text for the algorithm select option mm: move hugepage test examples to tools/testing/selftests/vm mm: move slabinfo.c to tools/vm mm: move page-types.c from Documentation to tools/vm selftests/Makefile: make `run_tests' depend on `all' selftests: launch individual selftests from the main Makefile radix-tree: use iterators in find_get_pages* functions radix-tree: rewrite gang lookup using iterator radix-tree: introduce bit-optimized iterator fs/proc/namespaces.c: prevent crash when ns_entries[] is empty nbd: rename the nbd_device variable from lo to nbd pidns: add reboot_pid_ns() to handle the reboot syscall sysctl: use bitmap library functions ipmi: use locks on watchdog timeout set on reboot ipmi: simplify locking ipmi: fix message handling during panics ipmi: use a tasklet for handling received messages ipmi: increase KCS timeouts ipmi: decrease the IPMI message transaction time in interrupt mode ...
Diffstat (limited to 'fs')
-rw-r--r--fs/buffer.c15
-rw-r--r--fs/proc/array.c2
-rw-r--r--fs/proc/namespaces.c6
-rw-r--r--fs/proc/task_mmu.c5
4 files changed, 20 insertions, 8 deletions
diff --git a/fs/buffer.c b/fs/buffer.c
index 70e2017edd70..36d66653b931 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -1384,10 +1384,23 @@ static void invalidate_bh_lru(void *arg)
1384 } 1384 }
1385 put_cpu_var(bh_lrus); 1385 put_cpu_var(bh_lrus);
1386} 1386}
1387
1388static bool has_bh_in_lru(int cpu, void *dummy)
1389{
1390 struct bh_lru *b = per_cpu_ptr(&bh_lrus, cpu);
1391 int i;
1387 1392
1393 for (i = 0; i < BH_LRU_SIZE; i++) {
1394 if (b->bhs[i])
1395 return 1;
1396 }
1397
1398 return 0;
1399}
1400
1388void invalidate_bh_lrus(void) 1401void invalidate_bh_lrus(void)
1389{ 1402{
1390 on_each_cpu(invalidate_bh_lru, NULL, 1); 1403 on_each_cpu_cond(has_bh_in_lru, invalidate_bh_lru, NULL, 1, GFP_KERNEL);
1391} 1404}
1392EXPORT_SYMBOL_GPL(invalidate_bh_lrus); 1405EXPORT_SYMBOL_GPL(invalidate_bh_lrus);
1393 1406
diff --git a/fs/proc/array.c b/fs/proc/array.c
index fbb53c249086..f9bd395b3473 100644
--- a/fs/proc/array.c
+++ b/fs/proc/array.c
@@ -550,7 +550,7 @@ int proc_pid_statm(struct seq_file *m, struct pid_namespace *ns,
550 seq_put_decimal_ull(m, ' ', shared); 550 seq_put_decimal_ull(m, ' ', shared);
551 seq_put_decimal_ull(m, ' ', text); 551 seq_put_decimal_ull(m, ' ', text);
552 seq_put_decimal_ull(m, ' ', 0); 552 seq_put_decimal_ull(m, ' ', 0);
553 seq_put_decimal_ull(m, ' ', text); 553 seq_put_decimal_ull(m, ' ', data);
554 seq_put_decimal_ull(m, ' ', 0); 554 seq_put_decimal_ull(m, ' ', 0);
555 seq_putc(m, '\n'); 555 seq_putc(m, '\n');
556 556
diff --git a/fs/proc/namespaces.c b/fs/proc/namespaces.c
index 3551f1f839eb..0d9e23a39e49 100644
--- a/fs/proc/namespaces.c
+++ b/fs/proc/namespaces.c
@@ -156,15 +156,15 @@ static struct dentry *proc_ns_dir_lookup(struct inode *dir,
156 if (!ptrace_may_access(task, PTRACE_MODE_READ)) 156 if (!ptrace_may_access(task, PTRACE_MODE_READ))
157 goto out; 157 goto out;
158 158
159 last = &ns_entries[ARRAY_SIZE(ns_entries) - 1]; 159 last = &ns_entries[ARRAY_SIZE(ns_entries)];
160 for (entry = ns_entries; entry <= last; entry++) { 160 for (entry = ns_entries; entry < last; entry++) {
161 if (strlen((*entry)->name) != len) 161 if (strlen((*entry)->name) != len)
162 continue; 162 continue;
163 if (!memcmp(dentry->d_name.name, (*entry)->name, len)) 163 if (!memcmp(dentry->d_name.name, (*entry)->name, len))
164 break; 164 break;
165 } 165 }
166 error = ERR_PTR(-ENOENT); 166 error = ERR_PTR(-ENOENT);
167 if (entry > last) 167 if (entry == last)
168 goto out; 168 goto out;
169 169
170 error = proc_ns_instantiate(dir, dentry, task, *entry); 170 error = proc_ns_instantiate(dir, dentry, task, *entry);
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
index 9694cc283511..c283832d411d 100644
--- a/fs/proc/task_mmu.c
+++ b/fs/proc/task_mmu.c
@@ -781,9 +781,6 @@ static int pagemap_pte_range(pmd_t *pmd, unsigned long addr, unsigned long end,
781 int err = 0; 781 int err = 0;
782 pagemap_entry_t pme = make_pme(PM_NOT_PRESENT); 782 pagemap_entry_t pme = make_pme(PM_NOT_PRESENT);
783 783
784 if (pmd_trans_unstable(pmd))
785 return 0;
786
787 /* find the first VMA at or above 'addr' */ 784 /* find the first VMA at or above 'addr' */
788 vma = find_vma(walk->mm, addr); 785 vma = find_vma(walk->mm, addr);
789 spin_lock(&walk->mm->page_table_lock); 786 spin_lock(&walk->mm->page_table_lock);
@@ -802,6 +799,8 @@ static int pagemap_pte_range(pmd_t *pmd, unsigned long addr, unsigned long end,
802 return err; 799 return err;
803 } 800 }
804 801
802 if (pmd_trans_unstable(pmd))
803 return 0;
805 for (; addr != end; addr += PAGE_SIZE) { 804 for (; addr != end; addr += PAGE_SIZE) {
806 805
807 /* check to see if we've left 'vma' behind 806 /* check to see if we've left 'vma' behind