diff options
Diffstat (limited to 'fs/seq_file.c')
-rw-r--r-- | fs/seq_file.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/fs/seq_file.c b/fs/seq_file.c index eae7d9dbf3ff..1326fc0d20b2 100644 --- a/fs/seq_file.c +++ b/fs/seq_file.c | |||
@@ -6,6 +6,7 @@ | |||
6 | */ | 6 | */ |
7 | 7 | ||
8 | #include <linux/fs.h> | 8 | #include <linux/fs.h> |
9 | #include <linux/mount.h> | ||
9 | #include <linux/module.h> | 10 | #include <linux/module.h> |
10 | #include <linux/seq_file.h> | 11 | #include <linux/seq_file.h> |
11 | #include <linux/slab.h> | 12 | #include <linux/slab.h> |
@@ -458,13 +459,16 @@ int seq_path_root(struct seq_file *m, struct path *path, struct path *root, | |||
458 | char *buf; | 459 | char *buf; |
459 | size_t size = seq_get_buf(m, &buf); | 460 | size_t size = seq_get_buf(m, &buf); |
460 | int res = -ENAMETOOLONG; | 461 | int res = -ENAMETOOLONG; |
462 | int cpu = get_cpu(); | ||
463 | put_cpu(); | ||
461 | 464 | ||
462 | if (size) { | 465 | if (size) { |
463 | char *p; | 466 | char *p; |
464 | 467 | ||
465 | spin_lock(&dcache_lock); | 468 | vfsmount_read_lock(cpu); |
466 | p = __d_path(path, root, buf, size); | 469 | p = __d_path(path, root, buf, size); |
467 | spin_unlock(&dcache_lock); | 470 | vfsmount_read_unlock(cpu); |
471 | |||
468 | res = PTR_ERR(p); | 472 | res = PTR_ERR(p); |
469 | if (!IS_ERR(p)) { | 473 | if (!IS_ERR(p)) { |
470 | char *end = mangle_path(buf, p, esc); | 474 | char *end = mangle_path(buf, p, esc); |