aufs4-standalone.patch 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440
  1. SPDX-License-Identifier: GPL-2.0
  2. aufs4.14 standalone patch
  3. diff --git a/fs/dcache.c b/fs/dcache.c
  4. index e3719a5..3203470 100644
  5. --- a/fs/dcache.c
  6. +++ b/fs/dcache.c
  7. @@ -1305,6 +1305,7 @@ void d_walk(struct dentry *parent, void *data,
  8. seq = 1;
  9. goto again;
  10. }
  11. +EXPORT_SYMBOL_GPL(d_walk);
  12. struct check_mount {
  13. struct vfsmount *mnt;
  14. @@ -2894,6 +2895,7 @@ void d_exchange(struct dentry *dentry1, struct dentry *dentry2)
  15. write_sequnlock(&rename_lock);
  16. }
  17. +EXPORT_SYMBOL_GPL(d_exchange);
  18. /**
  19. * d_ancestor - search for an ancestor
  20. diff --git a/fs/exec.c b/fs/exec.c
  21. index 3e14ba2..6818b01 100644
  22. --- a/fs/exec.c
  23. +++ b/fs/exec.c
  24. @@ -109,6 +109,7 @@ bool path_noexec(const struct path *path)
  25. return (path->mnt->mnt_flags & MNT_NOEXEC) ||
  26. (path->mnt->mnt_sb->s_iflags & SB_I_NOEXEC);
  27. }
  28. +EXPORT_SYMBOL_GPL(path_noexec);
  29. #ifdef CONFIG_USELIB
  30. /*
  31. diff --git a/fs/fcntl.c b/fs/fcntl.c
  32. index cffefab..725d190 100644
  33. --- a/fs/fcntl.c
  34. +++ b/fs/fcntl.c
  35. @@ -85,6 +85,7 @@ int setfl(int fd, struct file * filp, unsigned long arg)
  36. out:
  37. return error;
  38. }
  39. +EXPORT_SYMBOL_GPL(setfl);
  40. static void f_modown(struct file *filp, struct pid *pid, enum pid_type type,
  41. int force)
  42. diff --git a/fs/file_table.c b/fs/file_table.c
  43. index 61517f5..c6bab39c 100644
  44. --- a/fs/file_table.c
  45. +++ b/fs/file_table.c
  46. @@ -148,6 +148,7 @@ struct file *get_empty_filp(void)
  47. }
  48. return ERR_PTR(-ENFILE);
  49. }
  50. +EXPORT_SYMBOL_GPL(get_empty_filp);
  51. /**
  52. * alloc_file - allocate and initialize a 'struct file'
  53. @@ -258,6 +259,7 @@ void flush_delayed_fput(void)
  54. {
  55. delayed_fput(NULL);
  56. }
  57. +EXPORT_SYMBOL_GPL(flush_delayed_fput);
  58. static DECLARE_DELAYED_WORK(delayed_fput_work, delayed_fput);
  59. @@ -300,6 +302,7 @@ void __fput_sync(struct file *file)
  60. }
  61. EXPORT_SYMBOL(fput);
  62. +EXPORT_SYMBOL_GPL(__fput_sync);
  63. void put_filp(struct file *file)
  64. {
  65. @@ -308,6 +311,7 @@ void put_filp(struct file *file)
  66. file_free(file);
  67. }
  68. }
  69. +EXPORT_SYMBOL_GPL(put_filp);
  70. void __init files_init(void)
  71. {
  72. diff --git a/fs/inode.c b/fs/inode.c
  73. index f7800d6..f31a6c7 100644
  74. --- a/fs/inode.c
  75. +++ b/fs/inode.c
  76. @@ -1664,6 +1664,7 @@ int update_time(struct inode *inode, struct timespec *time, int flags)
  77. return update_time(inode, time, flags);
  78. }
  79. +EXPORT_SYMBOL_GPL(update_time);
  80. /**
  81. * touch_atime - update the access time
  82. diff --git a/fs/namespace.c b/fs/namespace.c
  83. index e5a4a7f..6d0c376 100644
  84. --- a/fs/namespace.c
  85. +++ b/fs/namespace.c
  86. @@ -517,6 +517,7 @@ void __mnt_drop_write(struct vfsmount *mnt)
  87. mnt_dec_writers(real_mount(mnt));
  88. preempt_enable();
  89. }
  90. +EXPORT_SYMBOL_GPL(__mnt_drop_write);
  91. /**
  92. * mnt_drop_write - give up write access to a mount
  93. @@ -851,6 +852,7 @@ int is_current_mnt_ns(struct vfsmount *mnt)
  94. {
  95. return check_mnt(real_mount(mnt));
  96. }
  97. +EXPORT_SYMBOL_GPL(is_current_mnt_ns);
  98. /*
  99. * vfsmount lock must be held for write
  100. @@ -1887,6 +1889,7 @@ int iterate_mounts(int (*f)(struct vfsmount *, void *), void *arg,
  101. }
  102. return 0;
  103. }
  104. +EXPORT_SYMBOL_GPL(iterate_mounts);
  105. static void cleanup_group_ids(struct mount *mnt, struct mount *end)
  106. {
  107. diff --git a/fs/notify/group.c b/fs/notify/group.c
  108. index 3235753..14a2d48 100644
  109. --- a/fs/notify/group.c
  110. +++ b/fs/notify/group.c
  111. @@ -22,6 +22,7 @@
  112. #include <linux/srcu.h>
  113. #include <linux/rculist.h>
  114. #include <linux/wait.h>
  115. +#include <linux/module.h>
  116. #include <linux/fsnotify_backend.h>
  117. #include "fsnotify.h"
  118. @@ -109,6 +110,7 @@ void fsnotify_get_group(struct fsnotify_group *group)
  119. {
  120. atomic_inc(&group->refcnt);
  121. }
  122. +EXPORT_SYMBOL_GPL(fsnotify_get_group);
  123. /*
  124. * Drop a reference to a group. Free it if it's through.
  125. @@ -118,6 +120,7 @@ void fsnotify_put_group(struct fsnotify_group *group)
  126. if (atomic_dec_and_test(&group->refcnt))
  127. fsnotify_final_destroy_group(group);
  128. }
  129. +EXPORT_SYMBOL_GPL(fsnotify_put_group);
  130. /*
  131. * Create a new fsnotify_group and hold a reference for the group returned.
  132. @@ -147,6 +150,7 @@ struct fsnotify_group *fsnotify_alloc_group(const struct fsnotify_ops *ops)
  133. return group;
  134. }
  135. +EXPORT_SYMBOL_GPL(fsnotify_alloc_group);
  136. int fsnotify_fasync(int fd, struct file *file, int on)
  137. {
  138. diff --git a/fs/notify/mark.c b/fs/notify/mark.c
  139. index 9991f88..117042c 100644
  140. --- a/fs/notify/mark.c
  141. +++ b/fs/notify/mark.c
  142. @@ -118,6 +118,7 @@ static bool fsnotify_get_mark_safe(struct fsnotify_mark *mark)
  143. {
  144. return atomic_inc_not_zero(&mark->refcnt);
  145. }
  146. +EXPORT_SYMBOL_GPL(fsnotify_put_mark);
  147. static void __fsnotify_recalc_mask(struct fsnotify_mark_connector *conn)
  148. {
  149. @@ -395,6 +396,7 @@ void fsnotify_destroy_mark(struct fsnotify_mark *mark,
  150. mutex_unlock(&group->mark_mutex);
  151. fsnotify_free_mark(mark);
  152. }
  153. +EXPORT_SYMBOL_GPL(fsnotify_destroy_mark);
  154. /*
  155. * Sorting function for lists of fsnotify marks.
  156. @@ -607,6 +609,7 @@ int fsnotify_add_mark_locked(struct fsnotify_mark *mark, struct inode *inode,
  157. fsnotify_put_mark(mark);
  158. return ret;
  159. }
  160. +EXPORT_SYMBOL_GPL(fsnotify_add_mark);
  161. int fsnotify_add_mark(struct fsnotify_mark *mark, struct inode *inode,
  162. struct vfsmount *mnt, int allow_dups)
  163. @@ -742,6 +745,7 @@ void fsnotify_init_mark(struct fsnotify_mark *mark,
  164. fsnotify_get_group(group);
  165. mark->group = group;
  166. }
  167. +EXPORT_SYMBOL_GPL(fsnotify_init_mark);
  168. /*
  169. * Destroy all marks in destroy_list, waits for SRCU period to finish before
  170. diff --git a/fs/open.c b/fs/open.c
  171. index 7ea1184..6e2e241 100644
  172. --- a/fs/open.c
  173. +++ b/fs/open.c
  174. @@ -64,6 +64,7 @@ int do_truncate(struct dentry *dentry, loff_t length, unsigned int time_attrs,
  175. inode_unlock(dentry->d_inode);
  176. return ret;
  177. }
  178. +EXPORT_SYMBOL_GPL(do_truncate);
  179. long vfs_truncate(const struct path *path, loff_t length)
  180. {
  181. @@ -691,6 +692,7 @@ int open_check_o_direct(struct file *f)
  182. }
  183. return 0;
  184. }
  185. +EXPORT_SYMBOL_GPL(open_check_o_direct);
  186. static int do_dentry_open(struct file *f,
  187. struct inode *inode,
  188. diff --git a/fs/read_write.c b/fs/read_write.c
  189. index 2388284..b2a68e5 100644
  190. --- a/fs/read_write.c
  191. +++ b/fs/read_write.c
  192. @@ -454,6 +454,7 @@ ssize_t vfs_read(struct file *file, char __user *buf, size_t count, loff_t *pos)
  193. return ret;
  194. }
  195. +EXPORT_SYMBOL_GPL(vfs_read);
  196. static ssize_t new_sync_write(struct file *filp, const char __user *buf, size_t len, loff_t *ppos)
  197. {
  198. @@ -494,6 +495,7 @@ vfs_readf_t vfs_readf(struct file *file)
  199. return new_sync_read;
  200. return ERR_PTR(-ENOSYS);
  201. }
  202. +EXPORT_SYMBOL_GPL(vfs_readf);
  203. vfs_writef_t vfs_writef(struct file *file)
  204. {
  205. @@ -505,6 +507,7 @@ vfs_writef_t vfs_writef(struct file *file)
  206. return new_sync_write;
  207. return ERR_PTR(-ENOSYS);
  208. }
  209. +EXPORT_SYMBOL_GPL(vfs_writef);
  210. ssize_t __kernel_write(struct file *file, const void *buf, size_t count, loff_t *pos)
  211. {
  212. @@ -574,6 +577,7 @@ ssize_t vfs_write(struct file *file, const char __user *buf, size_t count, loff_
  213. return ret;
  214. }
  215. +EXPORT_SYMBOL_GPL(vfs_write);
  216. static inline loff_t file_pos_read(struct file *file)
  217. {
  218. diff --git a/fs/splice.c b/fs/splice.c
  219. index eb888c6..7ab89d2 100644
  220. --- a/fs/splice.c
  221. +++ b/fs/splice.c
  222. @@ -850,6 +850,7 @@ long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
  223. return splice_write(pipe, out, ppos, len, flags);
  224. }
  225. +EXPORT_SYMBOL_GPL(do_splice_from);
  226. /*
  227. * Attempt to initiate a splice from a file to a pipe.
  228. @@ -879,6 +880,7 @@ long do_splice_to(struct file *in, loff_t *ppos,
  229. return splice_read(in, ppos, pipe, len, flags);
  230. }
  231. +EXPORT_SYMBOL_GPL(do_splice_to);
  232. /**
  233. * splice_direct_to_actor - splices data directly between two non-pipes
  234. diff --git a/fs/sync.c b/fs/sync.c
  235. index fe15900..e3386ea 100644
  236. --- a/fs/sync.c
  237. +++ b/fs/sync.c
  238. @@ -39,6 +39,7 @@ int __sync_filesystem(struct super_block *sb, int wait)
  239. sb->s_op->sync_fs(sb, wait);
  240. return __sync_blockdev(sb->s_bdev, wait);
  241. }
  242. +EXPORT_SYMBOL_GPL(__sync_filesystem);
  243. /*
  244. * Write out and wait upon all dirty data associated with this
  245. diff --git a/fs/xattr.c b/fs/xattr.c
  246. index 61cd28b..35570cd 100644
  247. --- a/fs/xattr.c
  248. +++ b/fs/xattr.c
  249. @@ -297,6 +297,7 @@ vfs_getxattr_alloc(struct dentry *dentry, const char *name, char **xattr_value,
  250. *xattr_value = value;
  251. return error;
  252. }
  253. +EXPORT_SYMBOL_GPL(vfs_getxattr_alloc);
  254. ssize_t
  255. __vfs_getxattr(struct dentry *dentry, struct inode *inode, const char *name,
  256. diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
  257. index bc97a97..895a1ba 100644
  258. --- a/kernel/locking/lockdep.c
  259. +++ b/kernel/locking/lockdep.c
  260. @@ -155,6 +155,7 @@ inline struct lock_class *lockdep_hlock_class(struct held_lock *hlock)
  261. }
  262. return lock_classes + hlock->class_idx - 1;
  263. }
  264. +EXPORT_SYMBOL_GPL(lockdep_hlock_class);
  265. #define hlock_class(hlock) lockdep_hlock_class(hlock)
  266. #ifdef CONFIG_LOCK_STAT
  267. diff --git a/kernel/task_work.c b/kernel/task_work.c
  268. index 5718b3e..e6c64d9 100644
  269. --- a/kernel/task_work.c
  270. +++ b/kernel/task_work.c
  271. @@ -116,3 +116,4 @@ void task_work_run(void)
  272. } while (work);
  273. }
  274. }
  275. +EXPORT_SYMBOL_GPL(task_work_run);
  276. diff --git a/security/commoncap.c b/security/commoncap.c
  277. index fc46f5b..90543ef 100644
  278. --- a/security/commoncap.c
  279. +++ b/security/commoncap.c
  280. @@ -1270,12 +1270,14 @@ int cap_mmap_addr(unsigned long addr)
  281. }
  282. return ret;
  283. }
  284. +EXPORT_SYMBOL_GPL(cap_mmap_addr);
  285. int cap_mmap_file(struct file *file, unsigned long reqprot,
  286. unsigned long prot, unsigned long flags)
  287. {
  288. return 0;
  289. }
  290. +EXPORT_SYMBOL_GPL(cap_mmap_file);
  291. #ifdef CONFIG_SECURITY
  292. diff --git a/security/device_cgroup.c b/security/device_cgroup.c
  293. index 5ef7e52..e2e959d 100644
  294. --- a/security/device_cgroup.c
  295. +++ b/security/device_cgroup.c
  296. @@ -8,6 +8,7 @@
  297. #include <linux/device_cgroup.h>
  298. #include <linux/cgroup.h>
  299. #include <linux/ctype.h>
  300. +#include <linux/export.h>
  301. #include <linux/list.h>
  302. #include <linux/uaccess.h>
  303. #include <linux/seq_file.h>
  304. @@ -850,6 +851,7 @@ int __devcgroup_inode_permission(struct inode *inode, int mask)
  305. return __devcgroup_check_permission(type, imajor(inode), iminor(inode),
  306. access);
  307. }
  308. +EXPORT_SYMBOL_GPL(__devcgroup_inode_permission);
  309. int devcgroup_inode_mknod(int mode, dev_t dev)
  310. {
  311. diff --git a/security/security.c b/security/security.c
  312. index 4bf0f57..b30d1e1 100644
  313. --- a/security/security.c
  314. +++ b/security/security.c
  315. @@ -530,6 +530,7 @@ int security_path_rmdir(const struct path *dir, struct dentry *dentry)
  316. return 0;
  317. return call_int_hook(path_rmdir, 0, dir, dentry);
  318. }
  319. +EXPORT_SYMBOL_GPL(security_path_rmdir);
  320. int security_path_unlink(const struct path *dir, struct dentry *dentry)
  321. {
  322. @@ -546,6 +547,7 @@ int security_path_symlink(const struct path *dir, struct dentry *dentry,
  323. return 0;
  324. return call_int_hook(path_symlink, 0, dir, dentry, old_name);
  325. }
  326. +EXPORT_SYMBOL_GPL(security_path_symlink);
  327. int security_path_link(struct dentry *old_dentry, const struct path *new_dir,
  328. struct dentry *new_dentry)
  329. @@ -554,6 +556,7 @@ int security_path_link(struct dentry *old_dentry, const struct path *new_dir,
  330. return 0;
  331. return call_int_hook(path_link, 0, old_dentry, new_dir, new_dentry);
  332. }
  333. +EXPORT_SYMBOL_GPL(security_path_link);
  334. int security_path_rename(const struct path *old_dir, struct dentry *old_dentry,
  335. const struct path *new_dir, struct dentry *new_dentry,
  336. @@ -581,6 +584,7 @@ int security_path_truncate(const struct path *path)
  337. return 0;
  338. return call_int_hook(path_truncate, 0, path);
  339. }
  340. +EXPORT_SYMBOL_GPL(security_path_truncate);
  341. int security_path_chmod(const struct path *path, umode_t mode)
  342. {
  343. @@ -588,6 +592,7 @@ int security_path_chmod(const struct path *path, umode_t mode)
  344. return 0;
  345. return call_int_hook(path_chmod, 0, path, mode);
  346. }
  347. +EXPORT_SYMBOL_GPL(security_path_chmod);
  348. int security_path_chown(const struct path *path, kuid_t uid, kgid_t gid)
  349. {
  350. @@ -595,6 +600,7 @@ int security_path_chown(const struct path *path, kuid_t uid, kgid_t gid)
  351. return 0;
  352. return call_int_hook(path_chown, 0, path, uid, gid);
  353. }
  354. +EXPORT_SYMBOL_GPL(security_path_chown);
  355. int security_path_chroot(const struct path *path)
  356. {
  357. @@ -680,6 +686,7 @@ int security_inode_readlink(struct dentry *dentry)
  358. return 0;
  359. return call_int_hook(inode_readlink, 0, dentry);
  360. }
  361. +EXPORT_SYMBOL_GPL(security_inode_readlink);
  362. int security_inode_follow_link(struct dentry *dentry, struct inode *inode,
  363. bool rcu)
  364. @@ -695,6 +702,7 @@ int security_inode_permission(struct inode *inode, int mask)
  365. return 0;
  366. return call_int_hook(inode_permission, 0, inode, mask);
  367. }
  368. +EXPORT_SYMBOL_GPL(security_inode_permission);
  369. int security_inode_setattr(struct dentry *dentry, struct iattr *attr)
  370. {
  371. @@ -866,6 +874,7 @@ int security_file_permission(struct file *file, int mask)
  372. return fsnotify_perm(file, mask);
  373. }
  374. +EXPORT_SYMBOL_GPL(security_file_permission);
  375. int security_file_alloc(struct file *file)
  376. {
  377. @@ -925,6 +934,7 @@ int security_mmap_file(struct file *file, unsigned long prot,
  378. return ret;
  379. return ima_file_mmap(file, prot);
  380. }
  381. +EXPORT_SYMBOL_GPL(security_mmap_file);
  382. int security_mmap_addr(unsigned long addr)
  383. {