summaryrefslogtreecommitdiff
path: root/patches
diff options
context:
space:
mode:
authorTobias Powalowski <tobias@T-POWA-LX.(none)>2010-10-30 18:37:14 +0200
committerTobias Powalowski <tobias@T-POWA-LX.(none)>2010-10-30 18:37:14 +0200
commite368a1447942825ad569bcbf5e4a2b98094636f4 (patch)
tree77f0a04f83d2d1b0d96b191ff69e137adb37333c /patches
parent53178d2b9b7b60bf5e5a44db7bc19a7acebc1bac (diff)
add aufs 2.6.36 patch
Diffstat (limited to 'patches')
-rw-r--r--patches/aufs2-2.6.36.patch130
1 files changed, 130 insertions, 0 deletions
diff --git a/patches/aufs2-2.6.36.patch b/patches/aufs2-2.6.36.patch
new file mode 100644
index 0000000..6fa2900
--- /dev/null
+++ b/patches/aufs2-2.6.36.patch
@@ -0,0 +1,130 @@
+diff --git a/fs/file_table.c b/fs/file_table.c
+index a04bdd8..fbf8908 100644
+--- a/fs/file_table.c
++++ b/fs/file_table.c
+@@ -20,7 +20,6 @@
+ #include <linux/cdev.h>
+ #include <linux/fsnotify.h>
+ #include <linux/sysctl.h>
+-#include <linux/lglock.h>
+ #include <linux/percpu_counter.h>
+ #include <linux/percpu.h>
+ #include <linux/ima.h>
+@@ -34,7 +33,6 @@ struct files_stat_struct files_stat = {
+ .max_files = NR_FILE
+ };
+
+-DECLARE_LGLOCK(files_lglock);
+ DEFINE_LGLOCK(files_lglock);
+
+ /* SLAB cache for file structures */
+@@ -394,37 +392,6 @@ void file_sb_list_del(struct file *file)
+ }
+ }
+
+-#ifdef CONFIG_SMP
+-
+-/*
+- * These macros iterate all files on all CPUs for a given superblock.
+- * files_lglock must be held globally.
+- */
+-#define do_file_list_for_each_entry(__sb, __file) \
+-{ \
+- int i; \
+- for_each_possible_cpu(i) { \
+- struct list_head *list; \
+- list = per_cpu_ptr((__sb)->s_files, i); \
+- list_for_each_entry((__file), list, f_u.fu_list)
+-
+-#define while_file_list_for_each_entry \
+- } \
+-}
+-
+-#else
+-
+-#define do_file_list_for_each_entry(__sb, __file) \
+-{ \
+- struct list_head *list; \
+- list = &(sb)->s_files; \
+- list_for_each_entry((__file), list, f_u.fu_list)
+-
+-#define while_file_list_for_each_entry \
+-}
+-
+-#endif
+-
+ int fs_may_remount_ro(struct super_block *sb)
+ {
+ struct file *file;
+diff --git a/fs/statfs.c b/fs/statfs.c
+index 30ea8c8..9025c98 100644
+--- a/fs/statfs.c
++++ b/fs/statfs.c
+@@ -61,6 +61,7 @@ int statfs_by_dentry(struct dentry *dentry, struct kstatfs *buf)
+ buf->f_frsize = buf->f_bsize;
+ return retval;
+ }
++EXPORT_SYMBOL(statfs_by_dentry);
+
+ int vfs_statfs(struct path *path, struct kstatfs *buf)
+ {
+diff --git a/include/linux/fs.h b/include/linux/fs.h
+index 63d069b..741d296 100644
+--- a/include/linux/fs.h
++++ b/include/linux/fs.h
+@@ -9,6 +9,7 @@
+ #include <linux/limits.h>
+ #include <linux/ioctl.h>
+ #include <linux/blk_types.h>
++#include <linux/lglock.h>
+
+ /*
+ * It's silly to have NR_OPEN bigger than NR_FILE, but you can change
+@@ -1814,6 +1815,7 @@ extern struct vfsmount *collect_mounts(struct path *);
+ extern void drop_collected_mounts(struct vfsmount *);
+ extern int iterate_mounts(int (*)(struct vfsmount *, void *), void *,
+ struct vfsmount *);
++extern int statfs_by_dentry(struct dentry *dentry, struct kstatfs *buf);
+ extern int vfs_statfs(struct path *, struct kstatfs *);
+ extern int statfs_by_dentry(struct dentry *, struct kstatfs *);
+ extern int freeze_super(struct super_block *super);
+@@ -2481,5 +2483,39 @@ int __init get_filesystem_list(char *buf);
+ #define OPEN_FMODE(flag) ((__force fmode_t)(((flag + 1) & O_ACCMODE) | \
+ (flag & FMODE_NONOTIFY)))
+
++
++DECLARE_LGLOCK(files_lglock);
++
++#ifdef CONFIG_SMP
++
++/*
++ * These macros iterate all files on all CPUs for a given superblock.
++ * files_lglock must be held globally.
++ */
++#define do_file_list_for_each_entry(__sb, __file) \
++{ \
++ int i; \
++ for_each_possible_cpu(i) { \
++ struct list_head *list; \
++ list = per_cpu_ptr((__sb)->s_files, i); \
++ list_for_each_entry((__file), list, f_u.fu_list)
++
++#define while_file_list_for_each_entry \
++ } \
++}
++
++#else
++
++#define do_file_list_for_each_entry(__sb, __file) \
++{ \
++ struct list_head *list; \
++ list = &(sb)->s_files; \
++ list_for_each_entry((__file), list, f_u.fu_list)
++
++#define while_file_list_for_each_entry \
++}
++
++#endif
++
+ #endif /* __KERNEL__ */
+ #endif /* _LINUX_FS_H */