Return-Path: Received: from mail-pd0-f175.google.com ([209.85.192.175]:35329 "EHLO mail-pd0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932439AbbFQHtr (ORCPT ); Wed, 17 Jun 2015 03:49:47 -0400 Message-ID: <55812695.8020401@gmail.com> Date: Wed, 17 Jun 2015 15:49:41 +0800 From: Kinglong Mee MIME-Version: 1.0 To: Al Viro , "J. Bruce Fields" , "linux-nfs@vger.kernel.org" , linux-fsdevel@vger.kernel.org CC: NeilBrown , Trond Myklebust , kinglongmee@gmail.com Subject: [PATCH 1/6 v5] fs_pin: Initialize value for fs_pin explicitly References: <5581266C.9080404@gmail.com> In-Reply-To: <5581266C.9080404@gmail.com> Content-Type: text/plain; charset=utf-8 Sender: linux-nfs-owner@vger.kernel.org List-ID: Without initialized, done in fs_pin at stack space may contains strange value. v3, v4, v5, Adds macro for header file Signed-off-by: Kinglong Mee --- include/linux/fs_pin.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/linux/fs_pin.h b/include/linux/fs_pin.h index 3886b3b..0dde7b7 100644 --- a/include/linux/fs_pin.h +++ b/include/linux/fs_pin.h @@ -1,3 +1,6 @@ +#ifndef _LINUX_FS_PIN_H +#define _LINUX_FS_PIN_H + #include 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 -- 2.4.3