[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YST/0e92OdSH0zjg@casper.infradead.org>
Date: Tue, 24 Aug 2021 15:18:57 +0100
From: Matthew Wilcox <willy@...radead.org>
To: David Howells <dhowells@...hat.com>
Cc: Jeffrey Altman <jaltman@...istor.com>,
linux-afs@...ts.infradead.org, Jeff Layton <jlayton@...nel.org>,
Ilya Dryomov <idryomov@...il.com>,
linux-fsdevel@...r.kernel.org, linux-cachefs@...hat.com,
linux-nfs@...r.kernel.org, linux-cifs@...r.kernel.org,
ceph-devel@...r.kernel.org, v9fs-developer@...ts.sourceforge.net,
devel@...ts.orangefs.org, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/6] afs: Fix afs_launder_page() to set correct start
file position
On Tue, Aug 24, 2021 at 02:24:47PM +0100, David Howells wrote:
> +++ b/fs/afs/write.c
> @@ -950,8 +950,8 @@ int afs_launder_page(struct page *page)
> iov_iter_bvec(&iter, WRITE, bv, 1, bv[0].bv_len);
>
> trace_afs_page_dirty(vnode, tracepoint_string("launder"), page);
> - ret = afs_store_data(vnode, &iter, (loff_t)page->index * PAGE_SIZE,
> - true);
> + ret = afs_store_data(vnode, &iter,
> + (loff_t)page->index * PAGE_SIZE + f, true);
This could be page_offset(page), which reads better to me:
ret = afs_store_data(vnode, &iter, page_offset(page) + f, true);
Powered by blists - more mailing lists