Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Aufs5 Standalone
Commits
e9ad0ca6
Commit
e9ad0ca6
authored
Oct 18, 2019
by
J. R. Okajima
Browse files
aufs5.2 20191021
Signed-off-by:
J. R. Okajima
<
hooanon05g@gmail.com
>
parent
7b09d139
Changes
2
Show whitespace changes
Inline
Side-by-side
include/uapi/linux/aufs_type.h
View file @
e9ad0ca6
...
@@ -40,7 +40,7 @@
...
@@ -40,7 +40,7 @@
#include <linux/limits.h>
#include <linux/limits.h>
#define AUFS_VERSION "5.2-2019101
4
"
#define AUFS_VERSION "5.2-201910
2
1"
/* todo? move this to linux-2.6.19/include/magic.h */
/* todo? move this to linux-2.6.19/include/magic.h */
#define AUFS_SUPER_MAGIC ('a' << 24 | 'u' << 16 | 'f' << 8 | 's')
#define AUFS_SUPER_MAGIC ('a' << 24 | 'u' << 16 | 'f' << 8 | 's')
...
...
proc_mounts.patch
View file @
e9ad0ca6
SPDX-License-Identifier: GPL-2.0
SPDX-License-Identifier: GPL-2.0
diff --git a/fs/mount.h b/fs/mount.h
diff --git a/fs/mount.h b/fs/mount.h
index 6250de544760..2
9abfea2db50
100644
index 6250de544760..2
0895d9e4371
100644
--- a/fs/mount.h
--- a/fs/mount.h
+++ b/fs/mount.h
+++ b/fs/mount.h
@@ -131,9 +131,7 @@
struct proc_mounts {
@@ -131,9 +131,7 @@
struct proc_mounts {
...
@@ -10,15 +10,15 @@ index 6250de544760..29abfea2db50 100644
...
@@ -10,15 +10,15 @@ index 6250de544760..29abfea2db50 100644
- void *cached_mount;
- void *cached_mount;
- u64 cached_event;
- u64 cached_event;
- loff_t cached_index;
- loff_t cached_index;
+
bool
filled;
+
size_t
filled;
};
};
extern const struct seq_operations mounts_op;
extern const struct seq_operations mounts_op;
diff --git a/fs/namespace.c b/fs/namespace.c
diff --git a/fs/namespace.c b/fs/namespace.c
index 6fbc9126367a..
36d8b8ac5be5
100644
index 6fbc9126367a..
6aec25c597c6
100644
--- a/fs/namespace.c
--- a/fs/namespace.c
+++ b/fs/namespace.c
+++ b/fs/namespace.c
@@ -1260,46 +1260,
7
8 @@
struct vfsmount *mnt_clone_internal(const struct path *path)
@@ -1260,46 +1260,8
0
@@
struct vfsmount *mnt_clone_internal(const struct path *path)
#ifdef CONFIG_PROC_FS
#ifdef CONFIG_PROC_FS
/* iterator; we want it to have access to namespace_sem, thus here... */
/* iterator; we want it to have access to namespace_sem, thus here... */
...
@@ -32,6 +32,7 @@ index 6fbc9126367a..36d8b8ac5be5 100644
...
@@ -32,6 +32,7 @@ index 6fbc9126367a..36d8b8ac5be5 100644
struct proc_mounts *p = m->private;
struct proc_mounts *p = m->private;
+ err = -ENODATA;
+ err = -ENODATA;
+ m->count = 0;
down_read(&namespace_sem);
down_read(&namespace_sem);
- if (p->cached_event == p->ns->event) {
- if (p->cached_event == p->ns->event) {
- void *v = p->cached_mount;
- void *v = p->cached_mount;
...
@@ -60,6 +61,7 @@ index 6fbc9126367a..36d8b8ac5be5 100644
...
@@ -60,6 +61,7 @@ index 6fbc9126367a..36d8b8ac5be5 100644
+ m->size += PAGE_SIZE;
+ m->size += PAGE_SIZE;
+ m->count = last_count;
+ m->count = last_count;
+
+
+#if 0 /* todo: consider the limit */
+ err = p->show(m, &r->mnt);
+ err = p->show(m, &r->mnt);
+ if (unlikely(err < 0))
+ if (unlikely(err < 0))
+ break;
+ break;
...
@@ -67,6 +69,7 @@ index 6fbc9126367a..36d8b8ac5be5 100644
...
@@ -67,6 +69,7 @@ index 6fbc9126367a..36d8b8ac5be5 100644
+ err = -EOVERFLOW;
+ err = -EOVERFLOW;
+ break;
+ break;
}
}
+#endif
}
}
+ up_read(&namespace_sem);
+ up_read(&namespace_sem);
...
@@ -75,20 +78,20 @@ index 6fbc9126367a..36d8b8ac5be5 100644
...
@@ -75,20 +78,20 @@ index 6fbc9126367a..36d8b8ac5be5 100644
- p->cached_index = *pos;
- p->cached_index = *pos;
- return p->cached_mount;
- return p->cached_mount;
+ if (!err)
+ if (!err)
+ p->filled =
true
;
+ p->filled =
m->count
;
+ return err;
+ return err;
}
}
-static void *m_next(struct seq_file *m, void *v, loff_t *pos)
-static void *m_next(struct seq_file *m, void *v, loff_t *pos)
+static void *m_start(struct seq_file *m, loff_t *pos)
+static void *m_start(struct seq_file *m, loff_t *pos)
{
{
- struct proc_mounts *p = m->private;
+ int err;
+ int err;
struct proc_mounts *p = m->private;
- p->cached_mount = seq_list_next(v, &p->ns->list, pos);
- p->cached_mount = seq_list_next(v, &p->ns->list, pos);
- p->cached_index = *pos;
- p->cached_index = *pos;
- return p->cached_mount;
- return p->cached_mount;
+ if (!
p->filled
) {
+ if (!
*pos
) {
+ err = m_start_fill(m);
+ err = m_start_fill(m);
+ if (unlikely(err))
+ if (unlikely(err))
+ return ERR_PTR(err);
+ return ERR_PTR(err);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment