OSDN Git Service

mm/filemap: add filemap_range_uptodate
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Wed, 24 Feb 2021 20:02:28 +0000 (12:02 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 24 Feb 2021 21:38:28 +0000 (13:38 -0800)
commitfce70da3a80fcd0a9c0192dedd6bf86a43845ac9
treece139414787cb026d4a5305d4ddc808c95eda252
parent87d1d7b688319ae1580f057faa460d7f0b381430
mm/filemap: add filemap_range_uptodate

Move the complicated condition and the calculations out of
filemap_update_page() into its own function.

[willy@infradead.org: unlock page before dropping its refcount]
Link: https://lkml.kernel.org/r/20210201125229.GO308988@casper.infradead.org
Link: https://lkml.kernel.org/r/20210122160140.223228-14-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Kent Overstreet <kent.overstreet@gmail.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Cc: Miaohe Lin <linmiaohe@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/filemap.c