]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
fix mm-filemap-add-mapping_seek_hole_data.patch
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Thu, 31 Dec 2020 22:04:18 +0000 (22:04 +0000)
committerJohannes Weiner <hannes@cmpxchg.org>
Thu, 31 Dec 2020 22:04:18 +0000 (22:04 +0000)
Link: https://lkml.kernel.org/r/20201124041507.28996-4-willy@infradead.org
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/filemap.c

index b8390e87e6cdf98f6e51b2f64de98d1a2471ff26..7ea37c95d7bc5ee7ca30785b42da3b9e3ebbfca9 100644 (file)
@@ -2654,7 +2654,8 @@ loff_t mapping_seek_hole_data(struct address_space *mapping, loff_t start,
                if (page_seek_match(page, seek_data))
                        goto unlock;
                start = pos + seek_page_size(&xas, page);
-               put_page(page);
+               if (!xa_is_value(page))
+                       put_page(page);
        }
        rcu_read_unlock();