From patchwork Thu Jun 25 14:18:43 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kinglong Mee X-Patchwork-Id: 6675451 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 77D04C05AC for ; Thu, 25 Jun 2015 14:19:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 092A7206C7 for ; Thu, 25 Jun 2015 14:19:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 34706206C0 for ; Thu, 25 Jun 2015 14:19:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751357AbbFYOTM (ORCPT ); Thu, 25 Jun 2015 10:19:12 -0400 Received: from mail-pd0-f175.google.com ([209.85.192.175]:33092 "EHLO mail-pd0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751006AbbFYOTL (ORCPT ); Thu, 25 Jun 2015 10:19:11 -0400 Received: by pdjn11 with SMTP id n11so54499515pdj.0; Thu, 25 Jun 2015 07:19:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=Bq6kOlBA4QAg6tQ8ziW/f4fSZy4nI8JKn8eicZRZHXQ=; b=iOtZns8kz/SZRpi+1EMF1+RaadXLg4OWe77H5pIJ3mCn6aRSWozy+N9+xplCyKmZSM iO7aUYHH4xK+X/58ooXA6ZsgVWmRpc0Vp8V1pT/BC/pUCg6v+TLlz5S2CICiKVabKhEO bqbwKAg/D2wyKIeRhB+74PRJfWX5mPlEA8sSPCVaFisvM+bl61qe/evvUcY4EeLC+z59 W6XvYoaVkrjtv27z+De1aCZKuFdCwLJRGCxNaY+keiZya0VhdT0KwPi7A6xNf27qibmq V3cNg8uML/bc0dMeQbBBwwrwwvN/Lw0gxUm8NbuKYqyzO/uGVcTgN4qLtvJtBba+iM0y UbnQ== X-Received: by 10.66.129.161 with SMTP id nx1mr92894777pab.84.1435241950637; Thu, 25 Jun 2015 07:19:10 -0700 (PDT) Received: from [192.168.99.10] ([104.143.41.79]) by mx.google.com with ESMTPSA id kk6sm30301606pdb.94.2015.06.25.07.18.53 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Jun 2015 07:18:56 -0700 (PDT) Message-ID: <558C0DC3.4020807@gmail.com> Date: Thu, 25 Jun 2015 22:18:43 +0800 From: Kinglong Mee User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 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 01/10 v6] fs_pin: Initialize value for fs_pin explicitly References: <558C0D6A.9050104@gmail.com> In-Reply-To: <558C0D6A.9050104@gmail.com> Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Spam-Status: No, score=-8.2 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Without initialized, done in fs_pin at stack space may contains strange value. v3, v4, v5, v6 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