[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)
This commit is contained in:
Steve French
2005-06-09 14:44:07 -07:00
parent 0b68177ccd
commit 3079ca621e
2 changed files with 4 additions and 1 deletions

View File

@@ -1352,6 +1352,8 @@ static void cifs_copy_cache_pages(struct address_space *mapping,
GFP_KERNEL)) {
page_cache_release(page);
cFYI(1, ("Add page cache failed"));
data += PAGE_CACHE_SIZE;
bytes_read -= PAGE_CACHE_SIZE;
continue;
}