wok-6.x view linux/stuff/aufs2-2.6.36-fix.patch @ rev 11871

Up: poppler to 0.18.3.
author Christopher Rogers <slaxemulator@gmail.com>
date Mon Feb 27 18:15:11 2012 -0500 (2012-02-27)
parents
children
line source
1 diff --git a/fs/file_table.c b/fs/file_table.c
2 index a04bdd8..fbf8908 100644
3 --- a/fs/file_table.c
4 +++ b/fs/file_table.c
5 @@ -20,7 +20,6 @@
6 #include <linux/cdev.h>
7 #include <linux/fsnotify.h>
8 #include <linux/sysctl.h>
9 -#include <linux/lglock.h>
10 #include <linux/percpu_counter.h>
11 #include <linux/percpu.h>
12 #include <linux/ima.h>
13 @@ -34,7 +33,6 @@ struct files_stat_struct files_stat = {
14 .max_files = NR_FILE
15 };
17 -DECLARE_LGLOCK(files_lglock);
18 DEFINE_LGLOCK(files_lglock);
20 /* SLAB cache for file structures */
21 @@ -394,37 +392,6 @@ void file_sb_list_del(struct file *file)
22 }
23 }
25 -#ifdef CONFIG_SMP
26 -
27 -/*
28 - * These macros iterate all files on all CPUs for a given superblock.
29 - * files_lglock must be held globally.
30 - */
31 -#define do_file_list_for_each_entry(__sb, __file) \
32 -{ \
33 - int i; \
34 - for_each_possible_cpu(i) { \
35 - struct list_head *list; \
36 - list = per_cpu_ptr((__sb)->s_files, i); \
37 - list_for_each_entry((__file), list, f_u.fu_list)
38 -
39 -#define while_file_list_for_each_entry \
40 - } \
41 -}
42 -
43 -#else
44 -
45 -#define do_file_list_for_each_entry(__sb, __file) \
46 -{ \
47 - struct list_head *list; \
48 - list = &(sb)->s_files; \
49 - list_for_each_entry((__file), list, f_u.fu_list)
50 -
51 -#define while_file_list_for_each_entry \
52 -}
53 -
54 -#endif
55 -
56 int fs_may_remount_ro(struct super_block *sb)
57 {
58 struct file *file;
59 diff --git a/fs/statfs.c b/fs/statfs.c
60 index 30ea8c8..9025c98 100644
61 --- a/fs/statfs.c
62 +++ b/fs/statfs.c
63 @@ -61,6 +61,7 @@ int statfs_by_dentry(struct dentry *dentry, struct kstatfs *buf)
64 buf->f_frsize = buf->f_bsize;
65 return retval;
66 }
67 +EXPORT_SYMBOL(statfs_by_dentry);
69 int vfs_statfs(struct path *path, struct kstatfs *buf)
70 {
71 diff --git a/include/linux/fs.h b/include/linux/fs.h
72 index 63d069b..741d296 100644
73 --- a/include/linux/fs.h
74 +++ b/include/linux/fs.h
75 @@ -9,6 +9,7 @@
76 #include <linux/limits.h>
77 #include <linux/ioctl.h>
78 #include <linux/blk_types.h>
79 +#include <linux/lglock.h>
81 /*
82 * It's silly to have NR_OPEN bigger than NR_FILE, but you can change
83 @@ -1814,6 +1815,7 @@ extern struct vfsmount *collect_mounts(struct path *);
84 extern void drop_collected_mounts(struct vfsmount *);
85 extern int iterate_mounts(int (*)(struct vfsmount *, void *), void *,
86 struct vfsmount *);
87 +extern int statfs_by_dentry(struct dentry *dentry, struct kstatfs *buf);
88 extern int vfs_statfs(struct path *, struct kstatfs *);
89 extern int statfs_by_dentry(struct dentry *, struct kstatfs *);
90 extern int freeze_super(struct super_block *super);
91 @@ -2481,5 +2483,39 @@ int __init get_filesystem_list(char *buf);
92 #define OPEN_FMODE(flag) ((__force fmode_t)(((flag + 1) & O_ACCMODE) | \
93 (flag & FMODE_NONOTIFY)))
95 +
96 +DECLARE_LGLOCK(files_lglock);
97 +
98 +#ifdef CONFIG_SMP
99 +
100 +/*
101 + * These macros iterate all files on all CPUs for a given superblock.
102 + * files_lglock must be held globally.
103 + */
104 +#define do_file_list_for_each_entry(__sb, __file) \
105 +{ \
106 + int i; \
107 + for_each_possible_cpu(i) { \
108 + struct list_head *list; \
109 + list = per_cpu_ptr((__sb)->s_files, i); \
110 + list_for_each_entry((__file), list, f_u.fu_list)
111 +
112 +#define while_file_list_for_each_entry \
113 + } \
114 +}
115 +
116 +#else
117 +
118 +#define do_file_list_for_each_entry(__sb, __file) \
119 +{ \
120 + struct list_head *list; \
121 + list = &(sb)->s_files; \
122 + list_for_each_entry((__file), list, f_u.fu_list)
123 +
124 +#define while_file_list_for_each_entry \
125 +}
126 +
127 +#endif
128 +
129 #endif /* __KERNEL__ */
130 #endif /* _LINUX_FS_H */