[RFC][PATCH] cifs: Fix cifs_writepages_region()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
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) ||





[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux