]> git.pld-linux.org Git - packages/kernel.git/blob - kernel-unionfs-apparmor.patch
- merged from LINUX_2_6
[packages/kernel.git] / kernel-unionfs-apparmor.patch
1 diff -upr linux-2.6.27/fs/unionfs./commonfops.c linux-2.6.27/fs/unionfs/commonfops.c
2 --- linux-2.6.27/fs/unionfs./commonfops.c       2008-11-01 23:44:27.122271002 +0100
3 +++ linux-2.6.27/fs/unionfs/commonfops.c        2008-11-02 21:59:38.452286527 +0100
4 @@ -87,7 +87,7 @@ retry:
5                                             lower_dentry->d_inode);
6         }
7         lower_dir_dentry = lock_parent(lower_dentry);
8 -       err = vfs_unlink(lower_dir_dentry->d_inode, lower_dentry);
9 +       err = vfs_unlink(lower_dir_dentry->d_inode, lower_dentry, 0);
10         unlock_dir(lower_dir_dentry);
11  
12  out:
13 diff -upr linux-2.6.27/fs/unionfs./copyup.c linux-2.6.27/fs/unionfs/copyup.c
14 --- linux-2.6.27/fs/unionfs./copyup.c   2008-11-01 23:44:27.125604213 +0100
15 +++ linux-2.6.27/fs/unionfs/copyup.c    2008-11-02 22:01:23.969645868 +0100
16 @@ -35,7 +35,7 @@ static int copyup_xattrs(struct dentry *
17         char *name_list_buf = NULL;
18  
19         /* query the actual size of the xattr list */
20 -       list_size = vfs_listxattr(old_lower_dentry, NULL, 0);
21 +       list_size = vfs_listxattr(old_lower_dentry, NULL, NULL, 0, NULL);
22         if (list_size <= 0) {
23                 err = list_size;
24                 goto out;
25 @@ -51,7 +51,8 @@ static int copyup_xattrs(struct dentry *
26         name_list_buf = name_list; /* save for kfree at end */
27  
28         /* now get the actual xattr list of the source file */
29 -       list_size = vfs_listxattr(old_lower_dentry, name_list, list_size);
30 +       list_size = vfs_listxattr(old_lower_dentry, NULL, name_list, list_size,
31 +                                 NULL);
32         if (list_size <= 0) {
33                 err = list_size;
34                 goto out;
35 @@ -70,8 +71,8 @@ static int copyup_xattrs(struct dentry *
36  
37                 /* Lock here since vfs_getxattr doesn't lock for us */
38                 mutex_lock(&old_lower_dentry->d_inode->i_mutex);
39 -               size = vfs_getxattr(old_lower_dentry, name_list,
40 -                                   attr_value, XATTR_SIZE_MAX);
41 +               size = vfs_getxattr(old_lower_dentry, NULL, name_list,
42 +                                   attr_value, XATTR_SIZE_MAX, NULL);
43                 mutex_unlock(&old_lower_dentry->d_inode->i_mutex);
44                 if (size < 0) {
45                         err = size;
46 @@ -82,8 +83,8 @@ static int copyup_xattrs(struct dentry *
47                         goto out;
48                 }
49                 /* Don't lock here since vfs_setxattr does it for us. */
50 -               err = vfs_setxattr(new_lower_dentry, name_list, attr_value,
51 -                                  size, 0);
52 +               err = vfs_setxattr(new_lower_dentry, NULL, name_list,
53 +                                  attr_value, size, 0, NULL);
54                 /*
55                  * Selinux depends on "security.*" xattrs, so to maintain
56                  * the security of copied-up files, if Selinux is active,
57 @@ -103,8 +103,8 @@
58                         }
59                         cap_raise(new_creds->cap_effective, CAP_FOWNER);
60                         old_creds = override_creds(new_creds);
61 -                       err = vfs_setxattr(new_lower_dentry, name_list,
62 -                                          attr_value, size, 0);
63 +                       err = vfs_setxattr(new_lower_dentry, NULL, name_list,
64 +                                          attr_value, size, 0, NULL);
65                         revert_creds(old_creds);
66                 }
67                 if (err < 0)
68 @@ -136,14 +136,14 @@ static int copyup_permissions(struct sup
69                 ATTR_ATIME_SET | ATTR_MTIME_SET | ATTR_FORCE |
70                 ATTR_GID | ATTR_UID;
71         mutex_lock(&new_lower_dentry->d_inode->i_mutex);
72 -       err = notify_change(new_lower_dentry, &newattrs);
73 +       err = notify_change(new_lower_dentry, NULL, &newattrs);
74         if (err)
75                 goto out;
76  
77         /* now try to change the mode and ignore EOPNOTSUPP on symlinks */
78         newattrs.ia_mode = i->i_mode;
79         newattrs.ia_valid = ATTR_MODE | ATTR_FORCE;
80 -       err = notify_change(new_lower_dentry, &newattrs);
81 +       err = notify_change(new_lower_dentry, NULL, &newattrs);
82         if (err == -EOPNOTSUPP &&
83             S_ISLNK(new_lower_dentry->d_inode->i_mode)) {
84                 printk(KERN_WARNING
85 @@ -487,7 +487,7 @@ out_unlink:
86          * quota, or something else happened so let's unlink; we don't
87          * really care about the return value of vfs_unlink
88          */
89 -       vfs_unlink(new_lower_parent_dentry->d_inode, new_lower_dentry);
90 +       vfs_unlink(new_lower_parent_dentry->d_inode, new_lower_dentry, 0);
91  
92         if (copyup_file) {
93                 /* need to close the file */
94 diff -upr linux-2.6.27/fs/unionfs./inode.c linux-2.6.27/fs/unionfs/inode.c
95 --- linux-2.6.27/fs/unionfs./inode.c    2008-11-01 23:44:27.125604213 +0100
96 +++ linux-2.6.27/fs/unionfs/inode.c     2008-11-02 22:01:34.062010764 +0100
97 @@ -279,8 +279,8 @@ static int unionfs_link(struct dentry *o
98         if (!err) {
99                 /* see Documentation/filesystems/unionfs/issues.txt */
100                 lockdep_off();
101 -               err = vfs_link(lower_old_dentry, lower_dir_dentry->d_inode,
102 -                              lower_new_dentry);
103 +               err = vfs_link(lower_old_dentry, NULL, lower_dir_dentry->d_inode,
104 +                              lower_new_dentry, 0);
105                 lockdep_on();
106         }
107         unlock_dir(lower_dir_dentry);
108 @@ -307,9 +307,9 @@ docopyup:
109                         /* see Documentation/filesystems/unionfs/issues.txt */
110                         lockdep_off();
111                         /* do vfs_link */
112 -                       err = vfs_link(lower_old_dentry,
113 +                       err = vfs_link(lower_old_dentry, NULL,
114                                        lower_dir_dentry->d_inode,
115 -                                      lower_new_dentry);
116 +                                      lower_new_dentry, 0);
117                         lockdep_on();
118                         unlock_dir(lower_dir_dentry);
119                         goto check_link;
120 @@ -394,7 +394,7 @@ static int unionfs_symlink(struct inode 
121         }
122  
123         mode = S_IALLUGO;
124 -       err = vfs_symlink(lower_parent_dentry->d_inode, lower_dentry, symname);
125 +       err = vfs_symlink(lower_parent_dentry->d_inode, lower_dentry, NULL, symname);
126         if (!err) {
127                 err = PTR_ERR(unionfs_interpose(dentry, dir->i_sb, 0));
128                 if (!err) {
129 @@ -486,7 +486,7 @@ static int unionfs_mkdir(struct inode *d
130                 }
131  
132                 err = vfs_mkdir(lower_parent_dentry->d_inode, lower_dentry,
133 -                               mode);
134 +                               NULL, mode);
135  
136                 unlock_dir(lower_parent_dentry);
137  
138 @@ -586,7 +586,7 @@ static int unionfs_mknod(struct inode *d
139                 goto out;
140         }
141  
142 -       err = vfs_mknod(lower_parent_dentry->d_inode, lower_dentry, mode, dev);
143 +       err = vfs_mknod(lower_parent_dentry->d_inode, lower_dentry, NULL, mode, dev);
144         if (!err) {
145                 err = PTR_ERR(unionfs_interpose(dentry, dir->i_sb, 0));
146                 if (!err) {
147 @@ -964,7 +964,7 @@ static int unionfs_setattr(struct dentry
148  
149         /* notify the (possibly copied-up) lower inode */
150         mutex_lock(&lower_inode->i_mutex);
151 -       err = notify_change(lower_dentry, ia);
152 +       err = notify_change(lower_dentry, NULL, ia);
153         mutex_unlock(&lower_inode->i_mutex);
154         if (err)
155                 goto out;
156 diff -upr linux-2.6.27/fs/unionfs./rename.c linux-2.6.27/fs/unionfs/rename.c
157 --- linux-2.6.27/fs/unionfs./rename.c   2008-11-01 23:44:27.129984553 +0100
158 +++ linux-2.6.27/fs/unionfs/rename.c    2008-11-02 21:59:52.069643557 +0100
159 @@ -121,8 +121,8 @@ static int __unionfs_rename(struct inode
160                 err = -ENOTEMPTY;
161                 goto out_err_unlock;
162         }
163 -       err = vfs_rename(lower_old_dir_dentry->d_inode, lower_old_dentry,
164 -                        lower_new_dir_dentry->d_inode, lower_new_dentry);
165 +       err = vfs_rename(lower_old_dir_dentry->d_inode, lower_old_dentry, NULL,
166 +                        lower_new_dir_dentry->d_inode, lower_new_dentry, 0);
167  out_err_unlock:
168         if (!err) {
169                 /* update parent dir times */
170 @@ -206,7 +206,7 @@ static int do_unionfs_rename(struct inod
171                 err = is_robranch_super(old_dir->i_sb, bindex);
172                 if (!err)
173                         err = vfs_unlink(unlink_dir_dentry->d_inode,
174 -                                        unlink_dentry);
175 +                                        unlink_dentry, 0);
176  
177                 fsstack_copy_attr_times(new_parent->d_inode,
178                                         unlink_dir_dentry->d_inode);
179 diff -upr linux-2.6.27/fs/unionfs./sioq.c linux-2.6.27/fs/unionfs/sioq.c
180 --- linux-2.6.27/fs/unionfs./sioq.c     2008-11-01 23:44:27.129984553 +0100
181 +++ linux-2.6.27/fs/unionfs/sioq.c      2008-11-02 21:59:59.574937832 +0100
182 @@ -69,7 +69,7 @@ void __unionfs_mkdir(struct work_struct 
183         struct sioq_args *args = container_of(work, struct sioq_args, work);
184         struct mkdir_args *m = &args->mkdir;
185  
186 -       args->err = vfs_mkdir(m->parent, m->dentry, m->mode);
187 +       args->err = vfs_mkdir(m->parent, m->dentry, NULL, m->mode);
188         complete(&args->comp);
189  }
190  
191 @@ -78,7 +78,7 @@ void __unionfs_mknod(struct work_struct 
192         struct sioq_args *args = container_of(work, struct sioq_args, work);
193         struct mknod_args *m = &args->mknod;
194  
195 -       args->err = vfs_mknod(m->parent, m->dentry, m->mode, m->dev);
196 +       args->err = vfs_mknod(m->parent, m->dentry, NULL, m->mode, m->dev);
197         complete(&args->comp);
198  }
199  
200 @@ -87,7 +87,7 @@ void __unionfs_symlink(struct work_struc
201         struct sioq_args *args = container_of(work, struct sioq_args, work);
202         struct symlink_args *s = &args->symlink;
203  
204 -       args->err = vfs_symlink(s->parent, s->dentry, s->symbuf);
205 +       args->err = vfs_symlink(s->parent, s->dentry, NULL, s->symbuf);
206         complete(&args->comp);
207  }
208  
209 @@ -96,6 +96,6 @@ void __unionfs_unlink(struct work_struct
210         struct sioq_args *args = container_of(work, struct sioq_args, work);
211         struct unlink_args *u = &args->unlink;
212  
213 -       args->err = vfs_unlink(u->parent, u->dentry);
214 +       args->err = vfs_unlink(u->parent, u->dentry, 0);
215         complete(&args->comp);
216  }
217 diff -upr linux-2.6.27/fs/unionfs./unlink.c linux-2.6.27/fs/unionfs/unlink.c
218 --- linux-2.6.27/fs/unionfs./unlink.c   2008-11-01 23:44:27.129984553 +0100
219 +++ linux-2.6.27/fs/unionfs/unlink.c    2008-11-02 22:00:09.670923950 +0100
220 @@ -72,10 +72,10 @@ static int unionfs_unlink_whiteout(struc
221                         lockdep_off();
222                         if (!S_ISDIR(lower_dentry->d_inode->i_mode))
223                                 err = vfs_unlink(lower_dir_dentry->d_inode,
224 -                                                               lower_dentry);
225 +                                                               lower_dentry, 0);
226                         else
227                                 err = vfs_rmdir(lower_dir_dentry->d_inode,
228 -                                                               lower_dentry);
229 +                                                               lower_dentry, 0);
230                         lockdep_on();
231                 }
232  
233 @@ -187,7 +187,7 @@ static int unionfs_rmdir_first(struct in
234         if (!err) {
235                 /* see Documentation/filesystems/unionfs/issues.txt */
236                 lockdep_off();
237 -               err = vfs_rmdir(lower_dir_dentry->d_inode, lower_dentry);
238 +               err = vfs_rmdir(lower_dir_dentry->d_inode, lower_dentry, 0);
239                 lockdep_on();
240         }
241         dput(lower_dentry);
242 diff -upr linux-2.6.27/fs/unionfs./whiteout.c linux-2.6.27/fs/unionfs/whiteout.c
243 --- linux-2.6.27/fs/unionfs./whiteout.c 2008-11-01 23:44:27.129984553 +0100
244 +++ linux-2.6.27/fs/unionfs/whiteout.c  2008-11-02 22:00:49.862895378 +0100
245 @@ -171,7 +171,7 @@ int unlink_whiteout(struct dentry *wh_de
246  
247         /* see Documentation/filesystems/unionfs/issues.txt */
248         lockdep_off();
249 -       err = vfs_unlink(lower_dir_dentry->d_inode, wh_dentry);
250 +       err = vfs_unlink(lower_dir_dentry->d_inode, wh_dentry, 0);
251         lockdep_on();
252         unlock_dir(lower_dir_dentry);
253  
254 @@ -405,7 +405,7 @@ static int do_delete_whiteouts(struct de
255                                 break;
256                         }
257                         if (lower_dentry->d_inode)
258 -                               err = vfs_unlink(lower_dir, lower_dentry);
259 +                               err = vfs_unlink(lower_dir, lower_dentry, 0);
260                         dput(lower_dentry);
261                         if (err)
262                                 break;
263 --- linux-2.6.27/fs/unionfs/xattr.c
264 +++ linux-2.6.27/fs/unionfs/xattr.c
265 @@ -55,7 +55,8 @@ ssize_t unionfs_getxattr(struct dentry *
266  
267         lower_dentry = unionfs_lower_dentry(dentry);
268  
269 -       err = vfs_getxattr(lower_dentry, (char *) name, value, size);
270 +       err = vfs_getxattr(lower_dentry, NULL, (char *) name, value, size,
271 +                          NULL);
272  
273  out:
274         unionfs_check_dentry(dentry);
275 @@ -84,8 +85,8 @@ int unionfs_setxattr(struct dentry *dent
276  
277         lower_dentry = unionfs_lower_dentry(dentry);
278  
279 -       err = vfs_setxattr(lower_dentry, (char *) name, (void *) value,
280 -                          size, flags);
281 +       err = vfs_setxattr(lower_dentry, NULL, (char *) name, (void *) value,
282 +                          size, flags, NULL);
283  
284  out:
285         unionfs_check_dentry(dentry);
286 @@ -113,7 +114,7 @@ int unionfs_removexattr(struct dentry *d
287  
288         lower_dentry = unionfs_lower_dentry(dentry);
289  
290 -       err = vfs_removexattr(lower_dentry, (char *) name);
291 +       err = vfs_removexattr(lower_dentry, NULL, (char *) name, NULL);
292  
293  out:
294         unionfs_check_dentry(dentry);
295 @@ -143,7 +144,7 @@ ssize_t unionfs_listxattr(struct dentry 
296         lower_dentry = unionfs_lower_dentry(dentry);
297  
298         encoded_list = list;
299 -       err = vfs_listxattr(lower_dentry, encoded_list, size);
300 +       err = vfs_listxattr(lower_dentry, NULL, encoded_list, size, NULL);
301  
302  out:
303         unionfs_check_dentry(dentry);
This page took 0.046779 seconds and 3 git commands to generate.