summaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifssmb.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/cifs/cifssmb.c')
-rw-r--r--fs/cifs/cifssmb.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
index 76fcb50295a3..a894bf809ff7 100644
--- a/fs/cifs/cifssmb.c
+++ b/fs/cifs/cifssmb.c
@@ -1929,17 +1929,17 @@ cifs_writev_requeue(struct cifs_writedata *wdata)
1929 1929
1930 wsize = server->ops->wp_retry_size(inode); 1930 wsize = server->ops->wp_retry_size(inode);
1931 if (wsize < rest_len) { 1931 if (wsize < rest_len) {
1932 nr_pages = wsize / PAGE_CACHE_SIZE; 1932 nr_pages = wsize / PAGE_SIZE;
1933 if (!nr_pages) { 1933 if (!nr_pages) {
1934 rc = -ENOTSUPP; 1934 rc = -ENOTSUPP;
1935 break; 1935 break;
1936 } 1936 }
1937 cur_len = nr_pages * PAGE_CACHE_SIZE; 1937 cur_len = nr_pages * PAGE_SIZE;
1938 tailsz = PAGE_CACHE_SIZE; 1938 tailsz = PAGE_SIZE;
1939 } else { 1939 } else {
1940 nr_pages = DIV_ROUND_UP(rest_len, PAGE_CACHE_SIZE); 1940 nr_pages = DIV_ROUND_UP(rest_len, PAGE_SIZE);
1941 cur_len = rest_len; 1941 cur_len = rest_len;
1942 tailsz = rest_len - (nr_pages - 1) * PAGE_CACHE_SIZE; 1942 tailsz = rest_len - (nr_pages - 1) * PAGE_SIZE;
1943 } 1943 }
1944 1944
1945 wdata2 = cifs_writedata_alloc(nr_pages, cifs_writev_complete); 1945 wdata2 = cifs_writedata_alloc(nr_pages, cifs_writev_complete);
@@ -1957,7 +1957,7 @@ cifs_writev_requeue(struct cifs_writedata *wdata)
1957 wdata2->sync_mode = wdata->sync_mode; 1957 wdata2->sync_mode = wdata->sync_mode;
1958 wdata2->nr_pages = nr_pages; 1958 wdata2->nr_pages = nr_pages;
1959 wdata2->offset = page_offset(wdata2->pages[0]); 1959 wdata2->offset = page_offset(wdata2->pages[0]);
1960 wdata2->pagesz = PAGE_CACHE_SIZE; 1960 wdata2->pagesz = PAGE_SIZE;
1961 wdata2->tailsz = tailsz; 1961 wdata2->tailsz = tailsz;
1962 wdata2->bytes = cur_len; 1962 wdata2->bytes = cur_len;
1963 1963
@@ -1975,7 +1975,7 @@ cifs_writev_requeue(struct cifs_writedata *wdata)
1975 if (rc != 0 && rc != -EAGAIN) { 1975 if (rc != 0 && rc != -EAGAIN) {
1976 SetPageError(wdata2->pages[j]); 1976 SetPageError(wdata2->pages[j]);
1977 end_page_writeback(wdata2->pages[j]); 1977 end_page_writeback(wdata2->pages[j]);
1978 page_cache_release(wdata2->pages[j]); 1978 put_page(wdata2->pages[j]);
1979 } 1979 }
1980 } 1980 }
1981 1981
@@ -2018,7 +2018,7 @@ cifs_writev_complete(struct work_struct *work)
2018 else if (wdata->result < 0) 2018 else if (wdata->result < 0)
2019 SetPageError(page); 2019 SetPageError(page);
2020 end_page_writeback(page); 2020 end_page_writeback(page);
2021 page_cache_release(page); 2021 put_page(page);
2022 } 2022 }
2023 if (wdata->result != -EAGAIN) 2023 if (wdata->result != -EAGAIN)
2024 mapping_set_error(inode->i_mapping, wdata->result); 2024 mapping_set_error(inode->i_mapping, wdata->result);