diff options
author | Sage Weil <sage@inktank.com> | 2013-08-15 14:11:45 -0400 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-08-15 14:11:45 -0400 |
commit | ee3e542fec6e69bc9fb668698889a37d93950ddf (patch) | |
tree | e74ee766a4764769ef1d3d45d266b4dea64101d3 /fs/dlm/config.c | |
parent | fe2a801b50c0bb8039d627e5ae1fec249d10ff39 (diff) | |
parent | f1d6e17f540af37bb1891480143669ba7636c4cf (diff) |
Merge remote-tracking branch 'linus/master' into testing
Diffstat (limited to 'fs/dlm/config.c')
-rw-r--r-- | fs/dlm/config.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/dlm/config.c b/fs/dlm/config.c index 7d58d5b112b5..76feb4b60fa6 100644 --- a/fs/dlm/config.c +++ b/fs/dlm/config.c | |||
@@ -138,8 +138,9 @@ static ssize_t cluster_cluster_name_read(struct dlm_cluster *cl, char *buf) | |||
138 | static ssize_t cluster_cluster_name_write(struct dlm_cluster *cl, | 138 | static ssize_t cluster_cluster_name_write(struct dlm_cluster *cl, |
139 | const char *buf, size_t len) | 139 | const char *buf, size_t len) |
140 | { | 140 | { |
141 | strncpy(dlm_config.ci_cluster_name, buf, DLM_LOCKSPACE_LEN); | 141 | strlcpy(dlm_config.ci_cluster_name, buf, |
142 | strncpy(cl->cl_cluster_name, buf, DLM_LOCKSPACE_LEN); | 142 | sizeof(dlm_config.ci_cluster_name)); |
143 | strlcpy(cl->cl_cluster_name, buf, sizeof(cl->cl_cluster_name)); | ||
143 | return len; | 144 | return len; |
144 | } | 145 | } |
145 | 146 | ||