Skip to content

Commit

Permalink
cifs: no need to use rcu_assign_pointer on immutable keys
Browse files Browse the repository at this point in the history
cifs: no need to use rcu_assign_pointer on immutable keys

Neither keytype in use by CIFS has an "update" method. This means that
the keys are immutable once instantiated. We don't need to use RCU
to set the payload data pointers.

Signed-off-by: Jeff Layton <[email protected]>
Signed-off-by: Steve French <[email protected]>
  • Loading branch information
jtlayton authored and Steve French committed Apr 17, 2009
1 parent 5144ebf commit d9fb5c0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion fs/cifs/cifs_spnego.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ cifs_spnego_key_instantiate(struct key *key, const void *data, size_t datalen)

/* attach the data */
memcpy(payload, data, datalen);
rcu_assign_pointer(key->payload.data, payload);
key->payload.data = payload;
ret = 0;

error:
Expand Down
2 changes: 1 addition & 1 deletion fs/cifs/dns_resolve.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ dns_resolver_instantiate(struct key *key, const void *data,
}

key->type_data.x[0] = datalen;
rcu_assign_pointer(key->payload.data, ip);
key->payload.data = ip;

return rc;
}
Expand Down

0 comments on commit d9fb5c0

Please sign in to comment.