diff mbox

fs_pin: Initialize done to 0 avoiding strange value

Message ID 553FB0DD.2040203@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Kinglong Mee April 28, 2015, 4:10 p.m. UTC
Without initialized, fs_pin in stack space may contains strange values.

Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
---
 include/linux/fs_pin.h | 1 +
 1 file changed, 1 insertion(+)
diff mbox

Patch

diff --git a/include/linux/fs_pin.h b/include/linux/fs_pin.h
index 3886b3b..18fad53 100644
--- a/include/linux/fs_pin.h
+++ b/include/linux/fs_pin.h
@@ -16,6 +16,7 @@  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 *);