summaryrefslogtreecommitdiffstats
path: root/drivers/misc/ibmvmc.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--drivers/misc/ibmvmc.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/misc/ibmvmc.c b/drivers/misc/ibmvmc.c
index 2101eb12bc..e5f935b524 100644
--- a/drivers/misc/ibmvmc.c
+++ b/drivers/misc/ibmvmc.c
@@ -1124,7 +1124,7 @@ static ssize_t ibmvmc_write(struct file *file, const char *buffer,
goto out;
inode = file_inode(file);
- inode->i_mtime = inode_set_ctime_current(inode);
+ inode_set_mtime_to_ts(inode, inode_set_ctime_current(inode));
mark_inode_dirty(inode);
dev_dbg(adapter->dev, "write: file = 0x%lx, count = 0x%lx\n",
@@ -1249,9 +1249,7 @@ static long ibmvmc_ioctl_sethmcid(struct ibmvmc_file_session *session,
return -EIO;
}
- /* Make sure buffer is NULL terminated before trying to print it */
- memset(print_buffer, 0, HMC_ID_LEN + 1);
- strncpy(print_buffer, hmc->hmc_id, HMC_ID_LEN);
+ strscpy(print_buffer, hmc->hmc_id, sizeof(print_buffer));
pr_info("ibmvmc: sethmcid: Set HMC ID: \"%s\"\n", print_buffer);
memcpy(buffer->real_addr_local, hmc->hmc_id, HMC_ID_LEN);