From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Trond Myklebust <trond.myklebust@primarydata.com>,
Anna Schumaker <anna.schumaker@netapp.com>
Cc: linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org,
Geert Uytterhoeven <geert@linux-m68k.org>
Subject: [PATCH] NFSv4: Fix anonymous member initializer in update_open_stateid()
Date: Mon, 17 Oct 2016 12:14:44 +0200 [thread overview]
Message-ID: <1476699284-5666-1-git-send-email-geert@linux-m68k.org> (raw)
With gcc 3.4/4.1/4.2/4.4/4.6/4.8:
fs/nfs/nfs4proc.c: In function ‘update_open_stateid’:
fs/nfs/nfs4proc.c:1548: warning: missing braces around initializer
fs/nfs/nfs4proc.c:1548: warning: (near initialization for ‘freeme.<anonymous>’)
Add the missing braces to fix this.
Fixes: 1393d9612ba02d8b ("NFSv4: Fix a race when updating an open_stateid")
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
See also commit e0714ec4f9efe7b8 ("nfs: fix anonymous member initializer
build failure with older compilers"). My first thought it was an old 4.x
thingy, but surprisingly this warning is also generated by gcc 4.8.4.
---
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 ad917bd72b38c3b2..6fa34095783239da 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 = { { { 0 } } };
int ret = 0;
fmode &= (FMODE_READ|FMODE_WRITE);
--
1.9.1
reply other threads:[~2016-10-17 10:14 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1476699284-5666-1-git-send-email-geert@linux-m68k.org \
--to=geert@linux-m68k.org \
--cc=anna.schumaker@netapp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=trond.myklebust@primarydata.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).