diff options
author | Steve French <sfrench@hera.kernel.org> | 2005-06-09 14:44:07 -0700 |
---|---|---|
committer | Steve French <sfrench@hera.kernel.org> | 2005-06-09 14:44:07 -0700 |
commit | 3079ca621e9e09f4593c20a9a2f24237c355f683 (patch) | |
tree | 0eb2e22cb0fa382cde357f9e6125043d1cdd3758 /fs/cifs/file.c | |
parent | 0b68177ccd12866d9f19cafad212b861c9d02a8c (diff) | |
download | linux-3079ca621e9e09f4593c20a9a2f24237c355f683.tar.bz2 |
[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)
Diffstat (limited to 'fs/cifs/file.c')
-rw-r--r-- | fs/cifs/file.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/cifs/file.c b/fs/cifs/file.c index dde2d251fc3d..30ab70ce5547 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c @@ -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; } |