aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--features/yaffs2/0001-yaffs2-v5.12-build-fixups-not-runtime-tested.patch105
-rw-r--r--features/yaffs2/yaffs2.scc1
2 files changed, 106 insertions, 0 deletions
diff --git a/features/yaffs2/0001-yaffs2-v5.12-build-fixups-not-runtime-tested.patch b/features/yaffs2/0001-yaffs2-v5.12-build-fixups-not-runtime-tested.patch
new file mode 100644
index 00000000..13bbba8a
--- /dev/null
+++ b/features/yaffs2/0001-yaffs2-v5.12-build-fixups-not-runtime-tested.patch
@@ -0,0 +1,105 @@
+From d16f6eab238d58479a7140507a2eb32573c1a106 Mon Sep 17 00:00:00 2001
+From: Bruce Ashfield <bruce.ashfield@gmail.com>
+Date: Fri, 19 Mar 2021 12:13:36 -0400
+Subject: [PATCH] yaffs2: v5.12+ build fixups (not runtime tested)
+
+Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
+---
+ fs/yaffs2/yaffs_vfs.c | 21 +++++++++++----------
+ 1 file changed, 11 insertions(+), 10 deletions(-)
+
+diff --git a/fs/yaffs2/yaffs_vfs.c b/fs/yaffs2/yaffs_vfs.c
+index a9cf8edc2245..ee9d6955ed79 100644
+--- a/fs/yaffs2/yaffs_vfs.c
++++ b/fs/yaffs2/yaffs_vfs.c
+@@ -897,7 +897,7 @@ static int yaffs_vfs_setsize(struct inode *inode, loff_t newsize)
+ static int yaffs_vfs_setattr(struct inode *inode, struct iattr *attr)
+ {
+ #ifdef YAFFS_USE_SETATTR_COPY
+- setattr_copy(inode, attr);
++ setattr_copy(&init_user_ns,inode, attr);
+ return 0;
+ #else
+ return inode_setattr(inode, attr);
+@@ -905,7 +905,7 @@ static int yaffs_vfs_setattr(struct inode *inode, struct iattr *attr)
+
+ }
+
+-static int yaffs_setattr(struct dentry *dentry, struct iattr *attr)
++static int yaffs_setattr(struct user_namespace *ns, struct dentry *dentry, struct iattr *attr)
+ {
+ struct inode *inode = dentry->d_inode;
+ int error = 0;
+@@ -921,7 +921,7 @@ static int yaffs_setattr(struct dentry *dentry, struct iattr *attr)
+ #endif
+
+ if (error == 0)
+- error = setattr_prepare(dentry, attr);
++ error = setattr_prepare(&init_user_ns,dentry, attr);
+ if (error == 0) {
+ int result;
+ if (!error) {
+@@ -1339,7 +1339,7 @@ struct inode *yaffs_get_inode(struct super_block *sb, int mode, int dev,
+
+
+ #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 4, 0))
+-static int yaffs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode,
++static int yaffs_mknod(struct user_namespace *ns, struct inode *dir, struct dentry *dentry, umode_t mode,
+ dev_t rdev)
+ #elif (LINUX_VERSION_CODE > KERNEL_VERSION(2, 5, 0))
+ static int yaffs_mknod(struct inode *dir, struct dentry *dentry, int mode,
+@@ -1433,20 +1433,20 @@ static int yaffs_mknod(struct inode *dir, struct dentry *dentry, int mode,
+ }
+
+ #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 4, 0))
+-static int yaffs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
++static int yaffs_mkdir(struct user_namespace *ns, struct inode *dir, struct dentry *dentry, umode_t mode)
+ #else
+ static int yaffs_mkdir(struct inode *dir, struct dentry *dentry, int mode)
+ #endif
+ {
+ int ret_val;
+ yaffs_trace(YAFFS_TRACE_OS, "yaffs_mkdir");
+- ret_val = yaffs_mknod(dir, dentry, mode | S_IFDIR, 0);
++ ret_val = yaffs_mknod(ns, dir, dentry, mode | S_IFDIR, 0);
+ return ret_val;
+ }
+
+
+ #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0))
+-static int yaffs_create(struct inode *dir, struct dentry *dentry, umode_t mode,
++static int yaffs_create(struct user_namespace *ns, struct inode *dir, struct dentry *dentry, umode_t mode,
+ bool dummy)
+ #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 4, 0))
+ static int yaffs_create(struct inode *dir, struct dentry *dentry, umode_t mode,
+@@ -1459,7 +1459,7 @@ static int yaffs_create(struct inode *dir, struct dentry *dentry, int mode)
+ #endif
+ {
+ yaffs_trace(YAFFS_TRACE_OS, "yaffs_create");
+- return yaffs_mknod(dir, dentry, mode | S_IFREG, 0);
++ return yaffs_mknod(ns, dir, dentry, mode | S_IFREG, 0);
+ }
+
+ #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0))
+@@ -1551,7 +1551,8 @@ static int yaffs_link(struct dentry *old_dentry, struct inode *dir,
+ return -EPERM;
+ }
+
+-static int yaffs_symlink(struct inode *dir, struct dentry *dentry,
++static int yaffs_symlink(struct user_namespace *ns,
++ struct inode *dir, struct dentry *dentry,
+ const char *symname)
+ {
+ struct yaffs_obj *obj;
+@@ -1597,7 +1598,7 @@ static int yaffs_symlink(struct inode *dir, struct dentry *dentry,
+ * NB: POSIX says you can rename an object over an old object of the same name
+ */
+ #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0))
+-static int yaffs_rename(struct inode *old_dir, struct dentry *old_dentry,
++static int yaffs_rename(struct user_namespace *ns, struct inode *old_dir, struct dentry *old_dentry,
+ struct inode *new_dir, struct dentry *new_dentry, unsigned int unused)
+ #else
+ static int yaffs_rename(struct inode *old_dir, struct dentry *old_dentry,
+--
+2.19.1
+
diff --git a/features/yaffs2/yaffs2.scc b/features/yaffs2/yaffs2.scc
index 0ae18ce5..9b1bd8bc 100644
--- a/features/yaffs2/yaffs2.scc
+++ b/features/yaffs2/yaffs2.scc
@@ -12,3 +12,4 @@ patch yaffs2-fix-memory-leak-when-proc-yaffs-is-read.patch
patch yaffs2-v5.6-build-fixups.patch
patch yaffs-fix-misplaced-variable-declaration.patch
patch yaffs-include-blkdev.h.patch
+patch 0001-yaffs2-v5.12-build-fixups-not-runtime-tested.patch