lkml.org 
[lkml]   [2020]   [May]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v4 17/36] iomap: Inline data shouldn't see large pages
    Date
    From: "Matthew Wilcox (Oracle)" <willy@infradead.org>

    Assert that we're not seeing large pages in functions that read/write
    inline data, rather than zeroing out the tail.

    Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
    Reviewed-by: Christoph Hellwig <hch@lst.de>
    ---
    fs/iomap/buffered-io.c | 2 ++
    1 file changed, 2 insertions(+)

    diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c
    index b7504b8aa90c..782757258a28 100644
    --- a/fs/iomap/buffered-io.c
    +++ b/fs/iomap/buffered-io.c
    @@ -221,6 +221,7 @@ iomap_read_inline_data(struct inode *inode, struct page *page,
    return;

    BUG_ON(page->index);
    + BUG_ON(PageCompound(page));
    BUG_ON(size > PAGE_SIZE - offset_in_page(iomap->inline_data));

    addr = kmap_atomic(page);
    @@ -732,6 +733,7 @@ iomap_write_end_inline(struct inode *inode, struct page *page,
    void *addr;

    WARN_ON_ONCE(!PageUptodate(page));
    + BUG_ON(PageCompound(page));
    BUG_ON(pos + copied > PAGE_SIZE - offset_in_page(iomap->inline_data));

    addr = kmap_atomic(page);
    --
    2.26.2
    \
     
     \ /
      Last update: 2020-05-15 15:20    [W:4.123 / U:0.012 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site