lkml.org 
[lkml]   [2023]   [Feb]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Subject[RFC][PATCH] cifs: Fix cifs_writepages_region()
    From
    Date
    Here's the simplest fix for cifs_writepages_region() that gets it to work.

    Fix the cifs_writepages_region() to just skip over members of the batch that
    have been cleaned up rather than retrying them. I'm not entirely sure why it
    fixes it, though. It's also not the most efficient as, in the common case,
    this is going to happen a lot because cifs_extend_writeback() is going to
    clean up the contiguous pages in the batch - and then this skip will occur for
    those.

    Fix: 3822a7c40997 ("Merge tag 'mm-stable-2023-02-20-13-37' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm")
    Signed-off-by: David Howells <dhowells@redhat.com>
    ---
    diff --git a/fs/cifs/file.c b/fs/cifs/file.c
    index 5365a3299088..ebfcaae8c437 100644
    --- a/fs/cifs/file.c
    +++ b/fs/cifs/file.c
    @@ -2893,8 +2893,9 @@ static int cifs_writepages_region(struct address_space *mapping,

    if (folio_mapping(folio) != mapping ||
    !folio_test_dirty(folio)) {
    + start += folio_size(folio);
    folio_unlock(folio);
    - goto skip_write;
    + continue;
    }

    if (folio_test_writeback(folio) ||
    \
     
     \ /
      Last update: 2023-03-27 00:34    [W:4.181 / U:0.032 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site