Message ID | 163492971302.1038219.3619344566416020631.stgit@warthog.procyon.org.uk (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-cifs-owner@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F2240C433FE for <linux-cifs@archiver.kernel.org>; Fri, 22 Oct 2021 19:09:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E0C93610D0 for <linux-cifs@archiver.kernel.org>; Fri, 22 Oct 2021 19:09:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234190AbhJVTL7 (ORCPT <rfc822;linux-cifs@archiver.kernel.org>); Fri, 22 Oct 2021 15:11:59 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:29628 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234125AbhJVTLG (ORCPT <rfc822;linux-cifs@vger.kernel.org>); Fri, 22 Oct 2021 15:11:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634929728; 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=n1VZb0Xn4N6NISvttD2ZUsy8jQn+4P0ig2av100Y160=; b=cPIvBj4HvUifeZSqabg9Xd4Z2HpNm9N/MYoqef+f4wSvaAUVONrvweEkmhhRd124c3gfRc 8mdARncpAZEalI+reUq3a85RCbeYtBSF0DSqUPJR4vekbe0MtKq4mpCcLlelyhzqd/KWWB ls/eCfctMfSwyMBBtO59ic2AugjHUOY= 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-563-cvUP9piaPTO_Ct04vmPNag-1; Fri, 22 Oct 2021 15:08:42 -0400 X-MC-Unique: cvUP9piaPTO_Ct04vmPNag-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 414A4801FCE; Fri, 22 Oct 2021 19:08:40 +0000 (UTC) Received: from warthog.procyon.org.uk (unknown [10.33.36.19]) by smtp.corp.redhat.com (Postfix) with ESMTP id DAD7E17CDB; Fri, 22 Oct 2021 19:08:33 +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 v2 42/53] afs: Fix afs_write_end() to handle len > page size From: David Howells <dhowells@redhat.com> To: linux-cachefs@redhat.com Cc: Jeff Layton <jlayton@kernel.org>, Jeff Layton <jlayton@kernel.org>, Marc Dionne <marc.dionne@auristor.com>, Al Viro <viro@zeniv.linux.org.uk>, Matthew Wilcox <willy@infradead.org>, linux-afs@lists.infradead.org, dhowells@redhat.com, Trond Myklebust <trondmy@hammerspace.com>, Anna Schumaker <anna.schumaker@netapp.com>, Steve French <sfrench@samba.org>, Dominique Martinet <asmadeus@codewreck.org>, Jeff Layton <jlayton@kernel.com>, Matthew Wilcox <willy@infradead.org>, Alexander Viro <viro@zeniv.linux.org.uk>, Omar Sandoval <osandov@osandov.com>, Linus Torvalds <torvalds@linux-foundation.org>, 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: Fri, 22 Oct 2021 20:08:33 +0100 Message-ID: <163492971302.1038219.3619344566416020631.stgit@warthog.procyon.org.uk> In-Reply-To: <163492911924.1038219.13107463173777870713.stgit@warthog.procyon.org.uk> References: <163492911924.1038219.13107463173777870713.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.14 Precedence: bulk List-ID: <linux-cifs.vger.kernel.org> X-Mailing-List: linux-cifs@vger.kernel.org |
Series |
fscache: Rewrite index API and management system
|
expand
|
diff --git a/fs/afs/write.c b/fs/afs/write.c index ced72c6b9a80..19be3153d610 100644 --- a/fs/afs/write.c +++ b/fs/afs/write.c @@ -119,6 +119,7 @@ int afs_write_end(struct file *file, struct address_space *mapping, _enter("{%llx:%llu},{%lx}", vnode->fid.vid, vnode->fid.vnode, page->index); + len = min_t(size_t, len, thp_size(page) - from); if (!PageUptodate(page)) { if (copied < len) { copied = 0;