unsigned int nr_pages, struct address_space *mapping,
struct writeback_control *wbc)
{
- int rc = 0;
- unsigned int i;
+ int rc;
wdata->sync_mode = wbc->sync_mode;
wdata->nr_pages = nr_pages;
rc = adjust_credits(server, &wdata->credits, wdata->bytes);
if (rc)
- goto send_pages_out;
+ return rc;
if (!wdata->cfile) {
cifs_dbg(VFS, "No writable handle in writepages\n");
cifs_writedata_release);
}
-send_pages_out:
- for (i = 0; i < nr_pages; ++i)
- unlock_page(wdata->pages[i]);
-
return rc;
}
rc = wdata_send_pages(server, wdata, nr_pages, mapping, wbc);
+ for (i = 0; i < nr_pages; ++i)
+ unlock_page(wdata->pages[i]);
+
/* send failure -- clean up the mess */
if (rc != 0) {
add_credits_and_wake_if(server, &wdata->credits, 0);