77
77
#ifdef CONFIG_AUFS_HINOTIFY
79
void au_hin_init(struct aufs_hinode *hinode, struct aufs_hinotify *val)
79
void au_hin_init(struct au_hinode *hinode, struct au_hinotify *val)
81
81
hinode->hi_notify = val;
86
int au_hin_alloc(struct aufs_hinode *hinode, struct inode *inode,
85
int au_hin_alloc(struct au_hinode *hinode, struct inode *inode,
87
86
struct inode *h_inode);
88
void au_hin_free(struct aufs_hinode *hinode);
87
void au_hin_free(struct au_hinode *hinode);
89
88
void au_do_hdir_lock(struct inode *h_dir, struct inode *dir,
90
89
aufs_bindex_t bindex, unsigned int lsc);
91
void hdir_unlock(struct inode *h_dir, struct inode *dir, aufs_bindex_t bindex);
92
struct dentry *hdir_lock_rename(struct dentry **h_parents, struct inode **dirs,
93
aufs_bindex_t bindex, int issamedir);
94
void hdir_unlock_rename(struct dentry **h_parents, struct inode **dirs,
95
aufs_bindex_t bindex, int issamedir);
90
void au_hdir_unlock(struct inode *h_dir, struct inode *dir,
91
aufs_bindex_t bindex);
92
struct dentry *au_hdir_lock_rename(struct dentry **h_parents,
93
struct inode **dirs, aufs_bindex_t bindex,
95
void au_hdir_unlock_rename(struct dentry **h_parents, struct inode **dirs,
96
aufs_bindex_t bindex, int issamedir);
96
97
void au_reset_hinotify(struct inode *inode, unsigned int flags);
98
void au_hin_ignore(struct aufs_hinode *hinode, __u32 events);
99
void au_hin_unignore(struct aufs_hinode *hinode, __u32 events);
99
void au_hin_ignore(struct au_hinode *hinode, __u32 events);
100
void au_hin_unignore(struct au_hinode *hinode, __u32 events);
101
102
int __init au_inotify_init(void);
102
103
void au_inotify_fin(void);
105
void au_hin_init(struct aufs_hinode *hinode, struct aufs_hinotify *val)
108
void au_hin_init(struct au_hinode *hinode, struct au_hinotify *val)
111
int au_hin_alloc(struct aufs_hinode *hinode, struct inode *inode,
114
int au_hin_alloc(struct au_hinode *hinode, struct inode *inode,
112
115
struct inode *h_inode)
114
117
return -EOPNOTSUPP;
117
static inline void au_hin_free(struct aufs_hinode *hinode)
120
static inline void au_hin_free(struct au_hinode *hinode)
122
static inline void au_do_hdir_lock(struct inode *h_dir, struct inode *dir,
123
aufs_bindex_t bindex, unsigned int lsc)
126
void au_do_hdir_lock(struct inode *h_dir, struct inode *dir,
127
aufs_bindex_t bindex, unsigned int lsc)
125
129
vfsub_i_lock_nested(h_dir, lsc);
129
void hdir_unlock(struct inode *h_dir, struct inode *dir, aufs_bindex_t bindex)
133
void au_hdir_unlock(struct inode *h_dir, struct inode *dir,
134
aufs_bindex_t bindex)
131
136
vfsub_i_unlock(h_dir);
135
struct dentry *hdir_lock_rename(struct dentry **h_parents, struct inode **dirs,
136
aufs_bindex_t bindex, int issamedir)
140
struct dentry *au_hdir_lock_rename(struct dentry **h_parents,
141
struct inode **dirs, aufs_bindex_t bindex,
138
144
return vfsub_lock_rename(h_parents[0], h_parents[1]);
142
void hdir_unlock_rename(struct dentry **h_parents, struct inode **dirs,
143
aufs_bindex_t bindex, int issamedir)
148
void au_hdir_unlock_rename(struct dentry **h_parents, struct inode **dirs,
149
aufs_bindex_t bindex, int issamedir)
145
151
vfsub_unlock_rename(h_parents[0], h_parents[1]);
153
static inline __u32 au_notify_change_events(struct iattr *ia)
159
static inline void au_hin_ignore(struct au_hinotify *hinotify, __u32 events)
164
static inline void au_hin_unignore(struct au_hinotify *hinotify, __u32 events)
169
static inline int au_inotify_init(void)
158
static inline void au_hin_ignore(struct aufs_hinotify *hinotify, __u32 events)
163
static inline void au_hin_unignore(struct aufs_hinotify *hinotify, __u32 events)
168
#define au_inotify_init() 0
169
174
#define au_inotify_fin() do {} while (0)
170
175
#endif /* CONFIG_AUFS_HINOTIFY */
172
177
/* ---------------------------------------------------------------------- */
175
* hgdir_lock, hdir_lock, hdir2_lock
180
* hgdir_lock, au_hdir_lock, au_hdir2_lock
177
#define LockFunc(name, lsc) \
182
#define AuLockFunc(name, lsc) \
179
184
void name##_lock(struct inode *h_dir, struct inode *dir, aufs_bindex_t bindex) \
180
185
{ au_do_hdir_lock(h_dir, dir, bindex, AuLsc_I_##lsc); }
182
LockFunc(hdir, PARENT);
183
LockFunc(hdir2, PARENT2);
187
AuLockFunc(au_hdir, PARENT);
188
AuLockFunc(au_hdir2, PARENT2);
187
192
/* ---------------------------------------------------------------------- */