lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 01 May 2024 12:51:13 +0100
From: David Howells <dhowells@...hat.com>
To: Christian Brauner <christian@...uner.io>,
    Jeff Layton <jlayton@...nel.org>,
    Gao Xiang <hsiangkao@...ux.alibaba.com>,
    Dominique Martinet <asmadeus@...ewreck.org>
Cc: David Howells <dhowells@...hat.com>,
    Matthew Wilcox <willy@...radead.org>,
    Steve French <smfrench@...il.com>,
    Marc Dionne <marc.dionne@...istor.com>,
    Paulo Alcantara <pc@...guebit.com>,
    Shyam Prasad N <sprasad@...rosoft.com>, Tom Talpey <tom@...pey.com>,
    Eric Van Hensbergen <ericvh@...nel.org>,
    Ilya Dryomov <idryomov@...il.com>, netfs@...ts.linux.dev,
    linux-cachefs@...hat.com, linux-afs@...ts.infradead.org,
    linux-cifs@...r.kernel.org, linux-nfs@...r.kernel.org,
    ceph-devel@...r.kernel.org, v9fs@...ts.linux.dev,
    linux-erofs@...ts.ozlabs.org, linux-fsdevel@...r.kernel.org,
    linux-mm@...ck.org, netdev@...r.kernel.org,
    linux-kernel@...r.kernel.org, Miklos Szeredi <miklos@...redi.hu>,
    Trond Myklebust <trond.myklebust@...merspace.com>,
    Christoph Hellwig <hch@....de>,
    Andrew Morton <akpm@...ux-foundation.org>,
    Alexander Viro <viro@...iv.linux.org.uk>,
    Christian Brauner <brauner@...nel.org>, devel@...ts.orangefs.org
Subject: Re: [PATCH v2 07/22] mm: Provide a means of invalidation without using launder_folio

David Howells <dhowells@...hat.com> wrote:

> +			.range_start	= first,
> +			.range_end	= last,
> ...
> +	truncate_inode_pages_range(mapping, first, last);

These actually take file offsets and not page ranges and so the attached
change is needed.  Without this, the generic/412 xfstest fails.

David
---
diff --git a/mm/filemap.c b/mm/filemap.c
index 53516305b4b4..3916fc8b10e6 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -4171,15 +4171,15 @@ int filemap_invalidate_inode(struct inode *inode, bool flush,
 		struct writeback_control wbc = {
 			.sync_mode	= WB_SYNC_ALL,
 			.nr_to_write	= LONG_MAX,
-			.range_start	= first,
-			.range_end	= last,
+			.range_start	= start,
+			.range_end	= end,
 		};
 
 		filemap_fdatawrite_wbc(mapping, &wbc);
 	}
 
 	/* Wait for writeback to complete on all folios and discard. */
-	truncate_inode_pages_range(mapping, first, last);
+	truncate_inode_pages_range(mapping, start, end);
 
 unlock:
 	filemap_invalidate_unlock(mapping);


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ