nfs4: fix missing-braces warning
authorArnd Bergmann <arnd@arndb.de>
Tue, 18 Oct 2016 15:21:30 +0000 (17:21 +0200)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Wed, 19 Oct 2016 18:39:15 +0000 (14:39 -0400)
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 <arnd@arndb.de>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
fs/nfs/nfs4proc.c

index ed7da820d4bfdba1c5ca6237c51fd5aaa50a9544..45b38ee4813c10ea2ec4075e29f900c5b0b3cb8a 100644 (file)
@@ -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);