From patchwork Mon Jul 13 16:32:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Howells X-Patchwork-Id: 11660441 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 11A6113A4 for ; Mon, 13 Jul 2020 16:33:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EAC6C206F5 for ; Mon, 13 Jul 2020 16:33:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="dFDrs7x1" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730151AbgGMQct (ORCPT ); Mon, 13 Jul 2020 12:32:49 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:48478 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730552AbgGMQco (ORCPT ); Mon, 13 Jul 2020 12:32:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1594657963; 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=D1wPsoBbNSccmnM5FewiFx0xZyD377Fb6Hp+rWU3DnI=; b=dFDrs7x13G3yiGpJLZuYd9j+Ci6nkLywiRgZS2DO6YXFgbHYMeWnaSYepDggPDGXMbqM/O DR4z2f0zRNXK5MwilIYrfoiSIopSyNkNQvtSUZX6tz0/N40uOjxRR2x69SNbzPhizhePfz Widj8+CWh78QZ1fitKk7Jzz6GAdxu00= 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-236-aVjucGd_MIeHprorq-cBOQ-1; Mon, 13 Jul 2020 12:32:39 -0400 X-MC-Unique: aVjucGd_MIeHprorq-cBOQ-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 97D8110059B5; Mon, 13 Jul 2020 16:32:37 +0000 (UTC) Received: from warthog.procyon.org.uk (ovpn-112-113.rdu2.redhat.com [10.10.112.113]) by smtp.corp.redhat.com (Postfix) with ESMTP id 25C8760BF3; Mon, 13 Jul 2020 16:32:32 +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 10/32] fscache: Remove fscache_wait_on_invalidate() From: David Howells To: Trond Myklebust , Anna Schumaker , Steve French , Alexander Viro , Matthew Wilcox Cc: Jeff Layton , Dave Wysochanski , dhowells@redhat.com, linux-cachefs@redhat.com, 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, 13 Jul 2020 17:32:31 +0100 Message-ID: <159465795136.1376674.599056208279354471.stgit@warthog.procyon.org.uk> In-Reply-To: <159465784033.1376674.18106463693989811037.stgit@warthog.procyon.org.uk> References: <159465784033.1376674.18106463693989811037.stgit@warthog.procyon.org.uk> User-Agent: StGit/0.22 MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org Remove fscache_wait_on_invalidate() as the invalidation wait is now built into the I/O path. Signed-off-by: David Howells --- fs/fscache/cookie.c | 14 -------------- include/linux/fscache.h | 17 ----------------- 2 files changed, 31 deletions(-) diff --git a/fs/fscache/cookie.c b/fs/fscache/cookie.c index a8aa1639e93b..a1eba3be9ce8 100644 --- a/fs/fscache/cookie.c +++ b/fs/fscache/cookie.c @@ -492,20 +492,6 @@ void __fscache_invalidate(struct fscache_cookie *cookie) } EXPORT_SYMBOL(__fscache_invalidate); -/* - * Wait for object invalidation to complete. - */ -void __fscache_wait_on_invalidate(struct fscache_cookie *cookie) -{ - _enter("%p", cookie); - - wait_on_bit(&cookie->flags, FSCACHE_COOKIE_INVALIDATING, - TASK_UNINTERRUPTIBLE); - - _leave(""); -} -EXPORT_SYMBOL(__fscache_wait_on_invalidate); - /* * Update the index entries backing a cookie. The writeback is done lazily. */ diff --git a/include/linux/fscache.h b/include/linux/fscache.h index aec75fc0d297..56fdd0e74a88 100644 --- a/include/linux/fscache.h +++ b/include/linux/fscache.h @@ -217,7 +217,6 @@ extern void __fscache_unuse_cookie(struct fscache_cookie *, const void *, const extern void __fscache_relinquish_cookie(struct fscache_cookie *, bool); extern void __fscache_update_cookie(struct fscache_cookie *, const void *, const loff_t *); extern void __fscache_invalidate(struct fscache_cookie *); -extern void __fscache_wait_on_invalidate(struct fscache_cookie *); extern void __fscache_shape_request(struct fscache_cookie *, struct fscache_request_shape *); extern void __fscache_init_io_request(struct fscache_io_request *, struct fscache_cookie *); @@ -466,22 +465,6 @@ void fscache_invalidate(struct fscache_cookie *cookie) __fscache_invalidate(cookie); } -/** - * fscache_wait_on_invalidate - Wait for invalidation to complete - * @cookie: The cookie representing the cache object - * - * Wait for the invalidation of an object to complete. - * - * See Documentation/filesystems/caching/netfs-api.rst for a complete - * description. - */ -static inline -void fscache_wait_on_invalidate(struct fscache_cookie *cookie) -{ - if (fscache_cookie_valid(cookie)) - __fscache_wait_on_invalidate(cookie); -} - /** * fscache_init_io_request - Initialise an I/O request * @req: The I/O request to initialise