From patchwork Sat Aug 20 20:14:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Al Viro X-Patchwork-Id: 12949807 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A1BE2C25B08 for ; Sat, 20 Aug 2022 20:14:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230188AbiHTUOQ (ORCPT ); Sat, 20 Aug 2022 16:14:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37582 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229512AbiHTUOP (ORCPT ); Sat, 20 Aug 2022 16:14:15 -0400 Received: from zeniv.linux.org.uk (zeniv.linux.org.uk [IPv6:2a03:a000:7:0:5054:ff:fe1c:15ff]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C82722AE29 for ; Sat, 20 Aug 2022 13:14:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=linux.org.uk; s=zeniv-20220401; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=Jij4gGIu/9MC3WTRmKg7/qEVttspVOOd9biZwQejFIk=; b=EMAS06HzyVOJPTLH699fcgZ4xA zREapKzrQbXxpuRgo6+TwGqWUgHB/tlE6yg6N36HYhydjmfWqO6NSDnyroqMb397pj783hJi9TTSv 3WHd1GtMMvx3Hbw8byMknGXPkx9wIDPWd2Zv8NlRhA23bRezRAUTIvV5F9AF0WwA3qIt67FAXNBVS z7jk/dWtq4KKY66bX5C2M378KfDCWIXZ7kj4Idhql6Pop1ls+Q08Ab5MVuB8W7OytubBZKg9g7WiK bsTOZX28DtxEzI8+8IF5s+ECxety1zWMv79tQskP9Kg30vr+jOdL1uYC+gqUodV5SE8JgjxrnM4WK +2Oqj5GA==; Received: from viro by zeniv.linux.org.uk with local (Exim 4.95 #2 (Red Hat Linux)) id 1oPUrF-006T6w-8n; Sat, 20 Aug 2022 20:14:13 +0000 Date: Sat, 20 Aug 2022 21:14:13 +0100 From: Al Viro To: linux-fsdevel@vger.kernel.org Cc: Brad Warrum Subject: [PATCH 1/8] ibmvmc: don't open-code file_inode() Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Sender: Al Viro Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org badly, at that... Signed-off-by: Al Viro --- 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);