Skip to content

Commit

Permalink
NFS: Use non-atomic bit ops when initialising struct nfs_client_initdata
Browse files Browse the repository at this point in the history
We don't need atomic bit ops when initialising a local structure on the
stack.

Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
  • Loading branch information
Trond Myklebust committed Nov 4, 2019
1 parent 6430b32 commit d0372b6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion fs/nfs/nfs3client.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ struct nfs_client *nfs3_set_ds_client(struct nfs_server *mds_srv,
cl_init.nconnect = mds_clp->cl_nconnect;

if (mds_srv->flags & NFS_MOUNT_NORESVPORT)
set_bit(NFS_CS_NORESVPORT, &cl_init.init_flags);
__set_bit(NFS_CS_NORESVPORT, &cl_init.init_flags);

/* Use the MDS nfs_client cl_ipaddr. */
nfs_init_timeout_values(&ds_timeout, ds_proto, ds_timeo, ds_retrans);
Expand Down
6 changes: 3 additions & 3 deletions fs/nfs/nfs4client.c
Original file line number Diff line number Diff line change
Expand Up @@ -882,11 +882,11 @@ static int nfs4_set_client(struct nfs_server *server,
if (minorversion > 0 && proto == XPRT_TRANSPORT_TCP)
cl_init.nconnect = nconnect;
if (server->flags & NFS_MOUNT_NORESVPORT)
set_bit(NFS_CS_NORESVPORT, &cl_init.init_flags);
__set_bit(NFS_CS_NORESVPORT, &cl_init.init_flags);
if (server->options & NFS_OPTION_MIGRATION)
set_bit(NFS_CS_MIGRATION, &cl_init.init_flags);
__set_bit(NFS_CS_MIGRATION, &cl_init.init_flags);
if (test_bit(NFS_MIG_TSM_POSSIBLE, &server->mig_status))
set_bit(NFS_CS_TSM_POSSIBLE, &cl_init.init_flags);
__set_bit(NFS_CS_TSM_POSSIBLE, &cl_init.init_flags);
server->port = rpc_get_port(addr);

/* Allocate or find a client reference we can use */
Expand Down

0 comments on commit d0372b6

Please sign in to comment.