From: Al Viro Date: Thu, 4 Aug 2022 01:24:41 +0000 (-0400) Subject: ibmvmc: don't open-code file_inode() X-Git-Tag: v6.1-rc5~294^2~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8789c172e55db6e545789450a293d05c619268b2;p=platform%2Fkernel%2Flinux-starfive.git ibmvmc: don't open-code file_inode() badly, at that... Reviewed-by: Christian Brauner (Microsoft) Signed-off-by: Al Viro --- diff --git a/drivers/misc/ibmvmc.c b/drivers/misc/ibmvmc.c index c0fe3295c330..cbaf6d35e854 100644 --- a/drivers/misc/ibmvmc.c +++ b/drivers/misc/ibmvmc.c @@ -1039,6 +1039,7 @@ static unsigned int ibmvmc_poll(struct file *file, poll_table *wait) static ssize_t ibmvmc_write(struct file *file, const char *buffer, size_t count, loff_t *ppos) { + struct inode *inode; struct ibmvmc_buffer *vmc_buffer; struct ibmvmc_file_session *session; struct crq_server_adapter *adapter; @@ -1122,8 +1123,9 @@ static ssize_t ibmvmc_write(struct file *file, const char *buffer, if (p == buffer) goto out; - file->f_path.dentry->d_inode->i_mtime = current_time(file_inode(file)); - mark_inode_dirty(file->f_path.dentry->d_inode); + inode = file_inode(file); + inode->i_mtime = current_time(inode); + mark_inode_dirty(inode); dev_dbg(adapter->dev, "write: file = 0x%lx, count = 0x%lx\n", (unsigned long)file, (unsigned long)count);