summaryrefslogtreecommitdiff
path: root/packages/linux-kernel/patches/kernel/0002-VyOS-add-inotify-support-for-stackable-filesystems-o.patch
diff options
context:
space:
mode:
Diffstat (limited to 'packages/linux-kernel/patches/kernel/0002-VyOS-add-inotify-support-for-stackable-filesystems-o.patch')
-rw-r--r--packages/linux-kernel/patches/kernel/0002-VyOS-add-inotify-support-for-stackable-filesystems-o.patch38
1 files changed, 18 insertions, 20 deletions
diff --git a/packages/linux-kernel/patches/kernel/0002-VyOS-add-inotify-support-for-stackable-filesystems-o.patch b/packages/linux-kernel/patches/kernel/0002-VyOS-add-inotify-support-for-stackable-filesystems-o.patch
index a8a2aede..21f4cd60 100644
--- a/packages/linux-kernel/patches/kernel/0002-VyOS-add-inotify-support-for-stackable-filesystems-o.patch
+++ b/packages/linux-kernel/patches/kernel/0002-VyOS-add-inotify-support-for-stackable-filesystems-o.patch
@@ -21,13 +21,13 @@ Bug #425 http://bugzilla.vyos.net/show_bug.cgi?id=425
(cherry picked from commit a93f1128bc83b5a6628da242e71c18ef05e81ea2)
---
fs/notify/inotify/Kconfig | 9 +++
- fs/notify/inotify/inotify_user.c | 112 ++++++++++++++++++++++++++++++-
+ fs/notify/inotify/inotify_user.c | 110 ++++++++++++++++++++++++++++++-
fs/overlayfs/super.c | 24 ++++++-
include/linux/inotify.h | 28 ++++++++
- 4 files changed, 170 insertions(+), 3 deletions(-)
+ 4 files changed, 168 insertions(+), 3 deletions(-)
diff --git a/fs/notify/inotify/Kconfig b/fs/notify/inotify/Kconfig
-index b981fc0c8379..1ccd92e52784 100644
+index 6736e47d94d8..84d9b31300c0 100644
--- a/fs/notify/inotify/Kconfig
+++ b/fs/notify/inotify/Kconfig
@@ -15,3 +15,12 @@ config INOTIFY_USER
@@ -44,10 +44,10 @@ index b981fc0c8379..1ccd92e52784 100644
+
+ If unsure, say N.
diff --git a/fs/notify/inotify/inotify_user.c b/fs/notify/inotify/inotify_user.c
-index 97a51690338e..0595de27e1b5 100644
+index 81ffc8629fc4..cacedffa6534 100644
--- a/fs/notify/inotify/inotify_user.c
+++ b/fs/notify/inotify/inotify_user.c
-@@ -24,6 +24,7 @@
+@@ -15,6 +15,7 @@
#include <linux/file.h>
#include <linux/fs.h> /* struct inode */
@@ -55,7 +55,7 @@ index 97a51690338e..0595de27e1b5 100644
#include <linux/fsnotify_backend.h>
#include <linux/idr.h>
#include <linux/init.h> /* fs_initcall */
-@@ -85,6 +86,94 @@ struct ctl_table inotify_table[] = {
+@@ -75,6 +76,92 @@ struct ctl_table inotify_table[] = {
};
#endif /* CONFIG_SYSCTL */
@@ -134,7 +134,6 @@ index 97a51690338e..0595de27e1b5 100644
+EXPORT_SYMBOL_GPL(inotify_unregister_stackfs);
+
+#else
-+
+static inline struct inotify_stackfs* inotify_get_stackfs(struct path *path)
+{
+ return NULL;
@@ -146,30 +145,29 @@ index 97a51690338e..0595de27e1b5 100644
+
+#endif /* CONFIG_INOTIFY_STACKFS */
+
-+
static inline __u32 inotify_arg_to_mask(u32 arg)
{
__u32 mask;
-@@ -342,7 +431,7 @@ static const struct file_operations inotify_fops = {
+@@ -332,7 +419,7 @@ static const struct file_operations inotify_fops = {
/*
* find_inode - resolve a user-given path to a specific inode
*/
--static int inotify_find_inode(const char __user *dirname, struct path *path, unsigned flags)
-+static inline int __inotify_find_inode(const char __user *dirname, struct path *path, unsigned flags)
+-static int inotify_find_inode(const char __user *dirname, struct path *path,
++static inline int __inotify_find_inode(const char __user *dirname, struct path *path,
+ unsigned int flags, __u64 mask)
{
int error;
-
-@@ -356,6 +445,27 @@ static int inotify_find_inode(const char __user *dirname, struct path *path, uns
+@@ -354,6 +441,27 @@ static int inotify_find_inode(const char __user *dirname, struct path *path,
return error;
}
-+static int inotify_find_inode(const char __user *dirname, struct path *path, unsigned flags)
++static int inotify_find_inode(const char __user *dirname, struct path *path, unsigned flags, __u64 mask)
+{
+ int ret;
+ struct path tpath;
+ struct inotify_stackfs *fse;
+
-+ ret = __inotify_find_inode(dirname, &tpath, flags);
++ ret = __inotify_find_inode(dirname, &tpath, flags, mask);
+ if (ret)
+ return ret;
+ fse = inotify_get_stackfs(&tpath);
@@ -188,10 +186,10 @@ index 97a51690338e..0595de27e1b5 100644
struct inotify_inode_mark *i_mark)
{
diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c
-index 246623406db9..dc13e98928ab 100644
+index d6b724beb304..380ac598f2e4 100644
--- a/fs/overlayfs/super.c
+++ b/fs/overlayfs/super.c
-@@ -18,6 +18,7 @@
+@@ -15,6 +15,7 @@
#include <linux/seq_file.h>
#include <linux/posix_acl_xattr.h>
#include <linux/exportfs.h>
@@ -199,7 +197,7 @@ index 246623406db9..dc13e98928ab 100644
#include "overlayfs.h"
MODULE_AUTHOR("Miklos Szeredi <miklos@szeredi.hu>");
-@@ -1712,6 +1713,18 @@ static void ovl_inode_init_once(void *foo)
+@@ -1758,6 +1759,18 @@ static void ovl_inode_init_once(void *foo)
inode_init_once(&oi->vfs_inode);
}
@@ -218,7 +216,7 @@ index 246623406db9..dc13e98928ab 100644
static int __init ovl_init(void)
{
int err;
-@@ -1726,13 +1739,21 @@ static int __init ovl_init(void)
+@@ -1772,13 +1785,21 @@ static int __init ovl_init(void)
err = register_filesystem(&ovl_fs_type);
if (err)
@@ -241,7 +239,7 @@ index 246623406db9..dc13e98928ab 100644
unregister_filesystem(&ovl_fs_type);
/*
-@@ -1741,7 +1762,6 @@ static void __exit ovl_exit(void)
+@@ -1787,7 +1808,6 @@ static void __exit ovl_exit(void)
*/
rcu_barrier();
kmem_cache_destroy(ovl_inode_cachep);