Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4144457pxj; Mon, 21 Jun 2021 14:46:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy8mrmSCR2fIREeNNpkz78vUP4jKgM+jTzVNvxdSrEOPnR6CtgpIlQsZ6DEuXUqq3OUU5RO X-Received: by 2002:a6b:4419:: with SMTP id r25mr104412ioa.205.1624311974418; Mon, 21 Jun 2021 14:46:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624311974; cv=none; d=google.com; s=arc-20160816; b=muZVtI0OmmjRv9c6DAzC0mTZZYTM03HwYX02Vb83CRInvEKSLre4dWukUSOHpps1eu 9CUfpxc6mtIra4arFEEA6HyR82W9M/J7m9jnlors5t8QVSqYEd95nnC2Y/T0qaTNUfqP 9HATp+Kuvu3kBoxXybZbmD7pZZGfnONzCYDb2I2ppbfwLdkf2iFytqMBYmgsnMLlz/9Y p/DiK7+24ZuzzSB8kRXmY6nKxNCp4Sx0A1LycFDryZgUx80aOhP9vD+r2xpmo8bZ4Ton ljYKbymmCAEgyD7vIVml8FKzlNxvb+aswxfEd1dwR3jFCKJ9zB/5RP2tH/IINNfh5bMP qq2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:cc:to:from :subject:organization:dkim-signature; bh=9a2MY8ARQzEQ3zqYXkakxIf8IPFL5sSJbn0FPCVo0X4=; b=gDKxtyZftx/mJz+LjoMptGGSGk03IeH0MBt89BV/NtkjkN7BJCp5X8gW7FY86vewTv cESMOXw6jZ8/fkr09Mm50c1gKB3Yin1EwMxvR5ThE1rSJDRnwtRS1d+B7lhRgVBYDdIa 08XL8DAHXTNNQu2CgcnUtoRwC1HbIZ9pfBOfhhJVMfx1SVpfO3SaCCbVgygySqdgs0w1 /iGRduaTqrGLdnRQ0A27exiAao17oI+mgmTEoZlmklS32VXSYvyQaoJeSLRjCMyTH8T7 4GCNcUKE6adTJm6PpFOn0MiEDrx4Q7aP6aERfKXGV7gZTNcdttViZa8Me5ti2Kf1s6hQ mL/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=OL+hHeC0; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q13si20861879iog.27.2021.06.21.14.46.02; Mon, 21 Jun 2021 14:46:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=OL+hHeC0; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231745AbhFUVry (ORCPT + 99 others); Mon, 21 Jun 2021 17:47:54 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:40522 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231890AbhFUVru (ORCPT ); Mon, 21 Jun 2021 17:47:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1624311935; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9a2MY8ARQzEQ3zqYXkakxIf8IPFL5sSJbn0FPCVo0X4=; b=OL+hHeC0WM6SukpBS0ebaPfBi62SBJSwv5OuKAUgS3AC+aL1+3JrwbsexyoNxGHNHPKAKM U1nNLcqjzB0nHsFYR7sysbRpRADHXLSImvOJ7sk7DD7Is0IbjGNXntpqoCSj27ofXQScq9 8pXWY2JZYvrV3+SPqr91XEv9DSfW7lw= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-193-XgYYiF4NMOyMA7K8CSpD-g-1; Mon, 21 Jun 2021 17:45:32 -0400 X-MC-Unique: XgYYiF4NMOyMA7K8CSpD-g-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3B05A100CF6F; Mon, 21 Jun 2021 21:45:30 +0000 (UTC) Received: from warthog.procyon.org.uk (ovpn-118-65.rdu2.redhat.com [10.10.118.65]) by smtp.corp.redhat.com (Postfix) with ESMTP id C7CD55C1C2; Mon, 21 Jun 2021 21:45:24 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 Subject: [PATCH 03/12] cachefiles: Use file_inode() rather than accessing ->f_inode From: David Howells To: linux-cachefs@redhat.com Cc: dhowells@redhat.com, Anna Schumaker , Steve French , Dominique Martinet , Jeff Layton , David Wysochanski , linux-afs@lists.infradead.org, linux-nfs@vger.kernel.org, linux-cifs@vger.kernel.org, ceph-devel@vger.kernel.org, v9fs-developer@lists.sourceforge.net, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Date: Mon, 21 Jun 2021 22:45:24 +0100 Message-ID: <162431192403.2908479.4590814090994846904.stgit@warthog.procyon.org.uk> In-Reply-To: <162431188431.2908479.14031376932042135080.stgit@warthog.procyon.org.uk> References: <162431188431.2908479.14031376932042135080.stgit@warthog.procyon.org.uk> User-Agent: StGit/0.23 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org Use the file_inode() helper rather than accessing ->f_inode directly. Signed-off-by: David Howells --- fs/cachefiles/io.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/cachefiles/io.c b/fs/cachefiles/io.c index ca68bb97ca00..fac2e8e7b533 100644 --- a/fs/cachefiles/io.c +++ b/fs/cachefiles/io.c @@ -70,7 +70,7 @@ static int cachefiles_read(struct netfs_cache_resources *cres, _enter("%pD,%li,%llx,%zx/%llx", file, file_inode(file)->i_ino, start_pos, len, - i_size_read(file->f_inode)); + i_size_read(file_inode(file))); /* If the caller asked us to seek for data before doing the read, then * we should do that now. If we find a gap, we fill it with zeros. @@ -194,7 +194,7 @@ static int cachefiles_write(struct netfs_cache_resources *cres, _enter("%pD,%li,%llx,%zx/%llx", file, file_inode(file)->i_ino, start_pos, len, - i_size_read(file->f_inode)); + i_size_read(file_inode(file))); ki = kzalloc(sizeof(struct cachefiles_kiocb), GFP_KERNEL); if (!ki)