89
89
/* ---------------------------------------------------------------------- */
92
93
#ifdef CONFIG_AUFS_SYSAUFS
94
extern struct mutex au_sbilist_mtx;
95
extern struct list_head au_sbilist;
97
static inline void au_sbilist_lock(void)
99
mutex_lock(&au_sbilist_mtx);
102
static inline void au_sbilist_unlock(void)
104
mutex_unlock(&au_sbilist_mtx);
107
static inline void au_sbilist_del(struct au_sbinfo *sbinfo)
109
list_del(&sbinfo->si_list);
112
static inline void au_sbilist_add(struct au_sbinfo *sbinfo)
114
/* the order in this list is important */
115
list_add_tail(&sbinfo->si_list, &au_sbilist);
93
118
struct sysaufs_br *sysaufs_br_alloc(void);
94
void sysaufs_br_get(struct aufs_branch *br);
95
void sysaufs_br_put(struct aufs_branch *br);
119
void sysaufs_br_get(struct au_branch *br);
120
void sysaufs_br_put(struct au_branch *br);
96
121
void sysaufs_brs_add(struct super_block *sb);
97
122
void sysaufs_brs_del(struct super_block *sb);
98
struct sysaufs_sbinfo *sysaufs_sbinfo_alloc(void);
99
void sysaufs_sbinfo_get(struct super_block *sb);
100
void sysaufs_sbinfo_put(struct super_block *sb);
101
void sysaufs_sbinfo_add(struct super_block *sb);
102
void sysaufs_sbinfo_del(struct super_block *sb);
123
int sysaufs_sbi_init(struct au_sbinfo *sbinfo);
124
void sysaufs_sbi_get(struct super_block *sb);
125
void sysaufs_sbi_put(struct super_block *sb);
126
void sysaufs_sbi_add(struct super_block *sb);
127
void sysaufs_sbi_del(struct super_block *sb);
103
128
int __init sysaufs_init(void);
104
129
void sysaufs_fin(void);
133
#define au_sbilist_lock() do {} while (0)
134
#define au_sbilist_unlock() do {} while (0)
136
static inline void au_sbilist_del(struct au_sbinfo *sbinfo)
141
static inline void au_sbilist_add(struct au_sbinfo *sbinfo)
108
146
static inline struct sysaufs_br *sysaufs_br_alloc(void)
110
148
return (void *)-1; //todo: poison
113
static inline void sysaufs_br_get(struct aufs_branch *br)
151
static inline void sysaufs_br_get(struct au_branch *br)
118
static inline void sysaufs_br_put(struct aufs_branch *br)
156
static inline void sysaufs_br_put(struct au_branch *br)
133
static inline struct sysaufs_sbinfo *sysaufs_sbinfo_alloc(void)
135
return (void *)-1; //todo: poison
138
static inline void sysaufs_sbinfo_get(struct super_block *sb)
143
static inline void sysaufs_sbinfo_put(struct super_block *sb)
148
static inline void sysaufs_sbinfo_add(struct super_block *sb)
153
static inline void sysaufs_sbinfo_del(struct super_block *sb)
158
#define sysaufs_init() 0
171
static inline int sysaufs_sbi_init(struct au_sbinfo *sbinfo)
176
static inline void sysaufs_sbi_get(struct super_block *sb)
181
static inline void sysaufs_sbi_put(struct super_block *sb)
186
static inline void sysaufs_sbi_add(struct super_block *sb)
191
static inline void sysaufs_sbi_del(struct super_block *sb)
196
static inline int sysaufs_init(void)
159
202
#define sysaufs_fin() do {} while (0)
161
204
#endif /* CONFIG_AUFS_SYSAUFS */