From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 28903C2B9F4 for ; Mon, 14 Jun 2021 21:11:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F2BE36128C for ; Mon, 14 Jun 2021 21:11:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234907AbhFNVNi (ORCPT ); Mon, 14 Jun 2021 17:13:38 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:36745 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234420AbhFNVNh (ORCPT ); Mon, 14 Jun 2021 17:13:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623705093; 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: in-reply-to:in-reply-to:references:references; bh=0Mn8+GlgrQdOA/I1bTqxQYRGsb/yRw3f+Z55lqaAtNs=; b=UcYrLSHQK/9feBnYo/opWDwuzhaayyXq8gB2bjyyTppYP1zNNgZey8bN1K0jC8w2bnXbeA N+gjQhOoSIDxU6Zn7z1SkGtmkyfwrKdyaoZ9eUiI8vrBg7+LISvvvuyzC0+J+uHnErQbA3 yWUDsNijWvZWfbJtefaOB8tgRcQBWRE= 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-33-3bfqkI24OYSv0GZSCObOOQ-1; Mon, 14 Jun 2021 17:11:30 -0400 X-MC-Unique: 3bfqkI24OYSv0GZSCObOOQ-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C7B7C1084F42; Mon, 14 Jun 2021 21:11:28 +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 8A5445D9CA; Mon, 14 Jun 2021 21:11:27 +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 From: David Howells In-Reply-To: References: <162367681795.460125.11729955608839747375.stgit@warthog.procyon.org.uk> <162367682522.460125.5652091227576721609.stgit@warthog.procyon.org.uk> <475131.1623685101@warthog.procyon.org.uk> To: Matthew Wilcox Cc: dhowells@redhat.com, jlayton@kernel.org, linux-afs@lists.infradead.org, ceph-devel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/3] afs: Fix afs_write_end() to handle short writes MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <501526.1623705086.1@warthog.procyon.org.uk> Date: Mon, 14 Jun 2021 22:11:26 +0100 Message-ID: <501527.1623705086@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Matthew Wilcox wrote: > > means you can't get there unless PageUptodate() is true by that point. > > Isn't the point of an assertion to check that this is true? The assertion was meant to check that that it was true given that the page was set uptodate somewhere else before this function was even called. With this patch, however, it's now set in this function if it wasn't already right at the top - so the assertion should now be redundant. I can put it back if you really insist. David