From patchwork Tue Oct 18 15:21:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9382359 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 02BE160839 for ; Tue, 18 Oct 2016 15:21:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E75F92960D for ; Tue, 18 Oct 2016 15:21:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DBB9229652; Tue, 18 Oct 2016 15:21:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.4 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6538E2960D for ; Tue, 18 Oct 2016 15:21:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935013AbcJRPV5 (ORCPT ); Tue, 18 Oct 2016 11:21:57 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:55252 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934965AbcJRPV4 (ORCPT ); Tue, 18 Oct 2016 11:21:56 -0400 Received: from wuerfel.lan. ([78.43.20.153]) by mrelayeu.kundenserver.de (mreue002) with ESMTPA (Nemesis) id 0Lkocf-1cV1gB3jWf-00aqLJ; Tue, 18 Oct 2016 17:21:43 +0200 From: Arnd Bergmann To: Trond Myklebust Cc: Arnd Bergmann , Anna Schumaker , Jeff Layton , Al Viro , Andreas Gruenbacher , Andy Adamson , linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] nfs4: fix missing-braces warning Date: Tue, 18 Oct 2016 17:21:30 +0200 Message-Id: <20161018152141.2774735-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:+B/hYrk8Qe10WK0dTffe7fYV6ZwU50aG+k2oYufwpWcvYEZJ7b9 SvIk2rQyZd5NtpoF1sfa8ea0Co+2xz7c5m+fnpEjy+qQDVvs+e5ehPjazLkkSZldhNMF+qa 4KU1TMOzE8WZzbVwfVeBJb/zi5jqnY5JHXAeUsKzb/G2k/ruFC4+dWwnYB/YMbRyXyz2Gb+ oz94oUwNyl0h1PC4VNxIg== X-UI-Out-Filterresults: notjunk:1; V01:K0:GuuktlfX7lM=:8puYDI1ut62mv+DJ0WjTU4 g0qMxV/F/Gixs8Mr0tE2mVLQtZzcqe51vzpJhn6NxLXbyp1HBVKeCeGtFDrYvGgqB3n8pKK0W KeqJt+Z7fiChgUq2z1JkPo4Nf8B4Uwc4gljupVpchs9LMJI20YLZf0240fibxOOR+Ct4XV3Yn VUf1FAirtFdTCCTk0fVDmYZcZ09y2BEUZmy8xMBjSpEFt52DxIObCCPvAzIpNnrtYW5rmC2X8 rVWQGXBjHorQW3jDqKqkyhGvfrVutmNDwUGGPCSbar1Mzkhs7XSSkDi8voLlGyvU43/uUF/YV Pd9uqRy+Bl//HsvE9qZyXnx2gzSjhghVoaP/YANbEdotNrCJNejxYLZ7ZiEMHXxdtux2sS+nv QVK58h1JDm18Hay5b3vgr93R8tlT95jHhCoPel74SK2BHzNf/0pa7EuoZrgM926g0Nhgged+y qDOAhgR2kIvNxNl4k4+GLk19IweP7qKAcZNOKsCWEp4G41c1D4ld0IKkRhnCX1zqD/eEImgfJ P2hI25NwuyWCBjx8PTw0PBMKC5AvTKg7sZEdgk9e8vXgDhimRsMrlDrWUl4jgESbzV58b0//T NqMNVRnJCGcYnNB05XjC0CpXeKfGDSzKSL11stGjQ9ZXbwamUf+JGcfF6/Kw7Vb5Wed96ESgf xZi2xpJRdDmsYc94xTaZk/PgU1pPObz8tdJefryUFKQBL7t9FNEkdPT0EzzIgpXHXgVw= Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP A bugfix introduced a harmless warning for update_open_stateid: fs/nfs/nfs4proc.c:1548:2: error: missing braces around initializer [-Werror=missing-braces] Removing the zero in the initializer will do the right thing here and initialize the entire structure to zero. Fixes: 1393d9612ba0 ("NFSv4: Fix a race when updating an open_stateid") Signed-off-by: Arnd Bergmann --- fs/nfs/nfs4proc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index ad917bd72b38..7897826d7c51 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -1545,7 +1545,7 @@ static int update_open_stateid(struct nfs4_state *state, struct nfs_client *clp = server->nfs_client; struct nfs_inode *nfsi = NFS_I(state->inode); struct nfs_delegation *deleg_cur; - nfs4_stateid freeme = {0}; + nfs4_stateid freeme = { }; int ret = 0; fmode &= (FMODE_READ|FMODE_WRITE);