wok diff linux/stuff/aufs2-2.6.36-fix.patch @ rev 8907
Up: dnsmasq to 2.57.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Mon Feb 28 02:28:06 2011 +0000 (2011-02-28) |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/linux/stuff/aufs2-2.6.36-fix.patch Mon Feb 28 02:28:06 2011 +0000 1.3 @@ -0,0 +1,130 @@ 1.4 +diff --git a/fs/file_table.c b/fs/file_table.c 1.5 +index a04bdd8..fbf8908 100644 1.6 +--- a/fs/file_table.c 1.7 ++++ b/fs/file_table.c 1.8 +@@ -20,7 +20,6 @@ 1.9 + #include <linux/cdev.h> 1.10 + #include <linux/fsnotify.h> 1.11 + #include <linux/sysctl.h> 1.12 +-#include <linux/lglock.h> 1.13 + #include <linux/percpu_counter.h> 1.14 + #include <linux/percpu.h> 1.15 + #include <linux/ima.h> 1.16 +@@ -34,7 +33,6 @@ struct files_stat_struct files_stat = { 1.17 + .max_files = NR_FILE 1.18 + }; 1.19 + 1.20 +-DECLARE_LGLOCK(files_lglock); 1.21 + DEFINE_LGLOCK(files_lglock); 1.22 + 1.23 + /* SLAB cache for file structures */ 1.24 +@@ -394,37 +392,6 @@ void file_sb_list_del(struct file *file) 1.25 + } 1.26 + } 1.27 + 1.28 +-#ifdef CONFIG_SMP 1.29 +- 1.30 +-/* 1.31 +- * These macros iterate all files on all CPUs for a given superblock. 1.32 +- * files_lglock must be held globally. 1.33 +- */ 1.34 +-#define do_file_list_for_each_entry(__sb, __file) \ 1.35 +-{ \ 1.36 +- int i; \ 1.37 +- for_each_possible_cpu(i) { \ 1.38 +- struct list_head *list; \ 1.39 +- list = per_cpu_ptr((__sb)->s_files, i); \ 1.40 +- list_for_each_entry((__file), list, f_u.fu_list) 1.41 +- 1.42 +-#define while_file_list_for_each_entry \ 1.43 +- } \ 1.44 +-} 1.45 +- 1.46 +-#else 1.47 +- 1.48 +-#define do_file_list_for_each_entry(__sb, __file) \ 1.49 +-{ \ 1.50 +- struct list_head *list; \ 1.51 +- list = &(sb)->s_files; \ 1.52 +- list_for_each_entry((__file), list, f_u.fu_list) 1.53 +- 1.54 +-#define while_file_list_for_each_entry \ 1.55 +-} 1.56 +- 1.57 +-#endif 1.58 +- 1.59 + int fs_may_remount_ro(struct super_block *sb) 1.60 + { 1.61 + struct file *file; 1.62 +diff --git a/fs/statfs.c b/fs/statfs.c 1.63 +index 30ea8c8..9025c98 100644 1.64 +--- a/fs/statfs.c 1.65 ++++ b/fs/statfs.c 1.66 +@@ -61,6 +61,7 @@ int statfs_by_dentry(struct dentry *dentry, struct kstatfs *buf) 1.67 + buf->f_frsize = buf->f_bsize; 1.68 + return retval; 1.69 + } 1.70 ++EXPORT_SYMBOL(statfs_by_dentry); 1.71 + 1.72 + int vfs_statfs(struct path *path, struct kstatfs *buf) 1.73 + { 1.74 +diff --git a/include/linux/fs.h b/include/linux/fs.h 1.75 +index 63d069b..741d296 100644 1.76 +--- a/include/linux/fs.h 1.77 ++++ b/include/linux/fs.h 1.78 +@@ -9,6 +9,7 @@ 1.79 + #include <linux/limits.h> 1.80 + #include <linux/ioctl.h> 1.81 + #include <linux/blk_types.h> 1.82 ++#include <linux/lglock.h> 1.83 + 1.84 + /* 1.85 + * It's silly to have NR_OPEN bigger than NR_FILE, but you can change 1.86 +@@ -1814,6 +1815,7 @@ extern struct vfsmount *collect_mounts(struct path *); 1.87 + extern void drop_collected_mounts(struct vfsmount *); 1.88 + extern int iterate_mounts(int (*)(struct vfsmount *, void *), void *, 1.89 + struct vfsmount *); 1.90 ++extern int statfs_by_dentry(struct dentry *dentry, struct kstatfs *buf); 1.91 + extern int vfs_statfs(struct path *, struct kstatfs *); 1.92 + extern int statfs_by_dentry(struct dentry *, struct kstatfs *); 1.93 + extern int freeze_super(struct super_block *super); 1.94 +@@ -2481,5 +2483,39 @@ int __init get_filesystem_list(char *buf); 1.95 + #define OPEN_FMODE(flag) ((__force fmode_t)(((flag + 1) & O_ACCMODE) | \ 1.96 + (flag & FMODE_NONOTIFY))) 1.97 + 1.98 ++ 1.99 ++DECLARE_LGLOCK(files_lglock); 1.100 ++ 1.101 ++#ifdef CONFIG_SMP 1.102 ++ 1.103 ++/* 1.104 ++ * These macros iterate all files on all CPUs for a given superblock. 1.105 ++ * files_lglock must be held globally. 1.106 ++ */ 1.107 ++#define do_file_list_for_each_entry(__sb, __file) \ 1.108 ++{ \ 1.109 ++ int i; \ 1.110 ++ for_each_possible_cpu(i) { \ 1.111 ++ struct list_head *list; \ 1.112 ++ list = per_cpu_ptr((__sb)->s_files, i); \ 1.113 ++ list_for_each_entry((__file), list, f_u.fu_list) 1.114 ++ 1.115 ++#define while_file_list_for_each_entry \ 1.116 ++ } \ 1.117 ++} 1.118 ++ 1.119 ++#else 1.120 ++ 1.121 ++#define do_file_list_for_each_entry(__sb, __file) \ 1.122 ++{ \ 1.123 ++ struct list_head *list; \ 1.124 ++ list = &(sb)->s_files; \ 1.125 ++ list_for_each_entry((__file), list, f_u.fu_list) 1.126 ++ 1.127 ++#define while_file_list_for_each_entry \ 1.128 ++} 1.129 ++ 1.130 ++#endif 1.131 ++ 1.132 + #endif /* __KERNEL__ */ 1.133 + #endif /* _LINUX_FS_H */