@@ -1,3 +1,6 @@
+#ifndef _LINUX_FS_PIN_H
+#define _LINUX_FS_PIN_H
+
#include <linux/wait.h>
struct fs_pin {
@@ -16,9 +19,12 @@ static inline void init_fs_pin(struct fs_pin *p, void (*kill)(struct fs_pin *))
INIT_HLIST_NODE(&p->s_list);
INIT_HLIST_NODE(&p->m_list);
p->kill = kill;
+ p->done = 0;
}
void pin_remove(struct fs_pin *);
void pin_insert_group(struct fs_pin *, struct vfsmount *, struct hlist_head *);
void pin_insert(struct fs_pin *, struct vfsmount *);
void pin_kill(struct fs_pin *);
+
+#endif
Without initialized, done in fs_pin at stack space may contains strange value. v3, v4, Adds macro for header file Signed-off-by: Kinglong Mee <kinglongmee@gmail.com> --- include/linux/fs_pin.h | 6 ++++++ 1 file changed, 6 insertions(+)