1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
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
|