All of lore.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@zeniv.linux.org.uk>
To: linux-fsdevel@vger.kernel.org
Cc: Brad Warrum <bwarrum@linux.ibm.com>
Subject: [PATCH 1/8] ibmvmc: don't open-code file_inode()
Date: Sat, 20 Aug 2022 21:14:13 +0100	[thread overview]
Message-ID: <YwFAlWnn2M8j2kSd@ZenIV> (raw)
In-Reply-To: <YwFANLruaQpqmPKv@ZenIV>

badly, at that...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
 drivers/misc/ibmvmc.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

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);
-- 
2.30.2


  reply	other threads:[~2022-08-20 20:14 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-20 20:12 [PATCHES] file_inode() and ->f_mapping cleanups Al Viro
2022-08-20 20:14 ` Al Viro [this message]
2022-08-20 20:14 ` [PATCH 2/8] exfat_iterate(): don't open-code file_inode(file) Al Viro
2022-08-20 20:16 ` [PATCH 3/8] sgx: use ->f_mapping Al Viro
2022-08-25  4:22   ` Jarkko Sakkinen
2022-08-20 20:16 ` [PATCH 4/8] bprm_fill_uid(): don't open-code file_inode() Al Viro
2022-08-20 20:17 ` [PATCH 5/8] nfs_finish_open(): " Al Viro
2022-08-20 20:19 ` [PATCH 6/8] dma_buf: no need to bother with file_inode()->i_mapping Al Viro
2022-08-20 20:19 ` [PATCH 7/8] _nfs42_proc_copy(): use ->f_mapping instead of file_inode()->i_mapping Al Viro
2022-08-20 20:20 ` [PATCH 8/8] orangefs: use ->f_mapping Al Viro
2022-09-21 19:30   ` Mike Marshall
2022-08-26  8:03 ` [PATCHES] file_inode() and ->f_mapping cleanups Christian Brauner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YwFAlWnn2M8j2kSd@ZenIV \
    --to=viro@zeniv.linux.org.uk \
    --cc=bwarrum@linux.ibm.com \
    --cc=linux-fsdevel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.