[PATCH] sysfs: fix sysfs_setattr
[pandora-kernel.git] / fs / cifs / file.c
index dde2d25..30ab70c 100644 (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;
                }