Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[CIFS] Fix cifs update of page cache. Write at correct offset when out of memory and add_to_page_cache fails.

Thanks to Shaggy for pointing out the fix.

Signed-off-by: Steve French (sfrench@us.ibm.com)
Signed-off-by: Shaggy (shaggy@us.ibm.com)

+4 -1
+2 -1
fs/cifs/CHANGES
··· 6 6 recommended, unmount and rmmod cifs will kill them when they are 7 7 no longer needed). Fix readdir to ASCII servers (ie older servers 8 8 which do not support Unicode) and also require asterik. 9 - 9 + Fix out of memory case in which data could be written one page 10 + off in the page cache. 10 11 11 12 Version 1.33 12 13 ------------
+2
fs/cifs/file.c
··· 1352 1352 GFP_KERNEL)) { 1353 1353 page_cache_release(page); 1354 1354 cFYI(1, ("Add page cache failed")); 1355 + data += PAGE_CACHE_SIZE; 1356 + bytes_read -= PAGE_CACHE_SIZE; 1355 1357 continue; 1356 1358 } 1357 1359