Commit b7cf1e75 authored by J. R. Okajima's avatar J. R. Okajima
Browse files

aufs5.x-rcN 20191021


Signed-off-by: default avatarJ. R. Okajima <hooanon05g@gmail.com>
parent e423c724
......@@ -40,7 +40,7 @@
#include <linux/limits.h>
#define AUFS_VERSION "5.x-rcN-20191014"
#define AUFS_VERSION "5.x-rcN-20191021"
/* todo? move this to linux-2.6.19/include/magic.h */
#define AUFS_SUPER_MAGIC ('a' << 24 | 'u' << 16 | 'f' << 8 | 's')
......
SPDX-License-Identifier: GPL-2.0
diff --git a/fs/mount.h b/fs/mount.h
index 711a4093e475..e8eae71ade24 100644
index 711a4093e475..a5703d5c7205 100644
--- a/fs/mount.h
+++ b/fs/mount.h
@@ -133,9 +133,7 @@ struct proc_mounts {
......@@ -10,15 +10,15 @@ index 711a4093e475..e8eae71ade24 100644
- void *cached_mount;
- u64 cached_event;
- loff_t cached_index;
+ bool filled;
+ size_t filled;
};
extern const struct seq_operations mounts_op;
diff --git a/fs/namespace.c b/fs/namespace.c
index d28d30b13043..0f4bbbdb137d 100644
index d28d30b13043..1b0fb30929c6 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -1246,46 +1246,78 @@ struct vfsmount *mnt_clone_internal(const struct path *path)
@@ -1246,46 +1246,80 @@ struct vfsmount *mnt_clone_internal(const struct path *path)
#ifdef CONFIG_PROC_FS
/* iterator; we want it to have access to namespace_sem, thus here... */
......@@ -32,6 +32,7 @@ index d28d30b13043..0f4bbbdb137d 100644
struct proc_mounts *p = m->private;
+ err = -ENODATA;
+ m->count = 0;
down_read(&namespace_sem);
- if (p->cached_event == p->ns->event) {
- void *v = p->cached_mount;
......@@ -60,6 +61,7 @@ index d28d30b13043..0f4bbbdb137d 100644
+ m->size += PAGE_SIZE;
+ m->count = last_count;
+
+#if 0 /* todo: consider the limit */
+ err = p->show(m, &r->mnt);
+ if (unlikely(err < 0))
+ break;
......@@ -67,6 +69,7 @@ index d28d30b13043..0f4bbbdb137d 100644
+ err = -EOVERFLOW;
+ break;
}
+#endif
}
+ up_read(&namespace_sem);
......@@ -75,20 +78,20 @@ index d28d30b13043..0f4bbbdb137d 100644
- p->cached_index = *pos;
- return p->cached_mount;
+ if (!err)
+ p->filled = true;
+ p->filled = m->count;
+ return err;
}
-static void *m_next(struct seq_file *m, void *v, loff_t *pos)
+static void *m_start(struct seq_file *m, loff_t *pos)
{
- struct proc_mounts *p = m->private;
+ int err;
struct proc_mounts *p = m->private;
- p->cached_mount = seq_list_next(v, &p->ns->list, pos);
- p->cached_index = *pos;
- return p->cached_mount;
+ if (!p->filled) {
+ if (!*pos) {
+ err = m_start_fill(m);
+ if (unlikely(err))
+ return ERR_PTR(err);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment