summaryrefslogtreecommitdiffstats
path: root/fs/cifs/file.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-12-15 23:56:43 +0900
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-12-15 23:56:43 +0900
commit326b06a8a9b09d6d9a276fd550b6b6bb138e9a47 (patch)
treeb9bdcb0bd635b91258cec09c981af2c5dcc0f683 /fs/cifs/file.c
parent92b2e81d6f95bcee386abac4c4389f5b950f7bb9 (diff)
parent9bffb1fb7c22c96d51d4ba06e2e023dd568a5872 (diff)
downloadop-kernel-dev-326b06a8a9b09d6d9a276fd550b6b6bb138e9a47.zip
op-kernel-dev-326b06a8a9b09d6d9a276fd550b6b6bb138e9a47.tar.gz
Merge remote-tracking branch 'asoc/topic/core' into asoc-next
Diffstat (limited to 'fs/cifs/file.c')
-rw-r--r--fs/cifs/file.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/cifs/file.c b/fs/cifs/file.c
index edb25b4..70b6f4c 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@ -1794,7 +1794,6 @@ static int cifs_writepages(struct address_space *mapping,
struct TCP_Server_Info *server;
struct page *page;
int rc = 0;
- loff_t isize = i_size_read(mapping->host);
/*
* If wsize is smaller than the page cache size, default to writing
@@ -1899,7 +1898,7 @@ retry:
*/
set_page_writeback(page);
- if (page_offset(page) >= isize) {
+ if (page_offset(page) >= i_size_read(mapping->host)) {
done = true;
unlock_page(page);
end_page_writeback(page);
@@ -1932,7 +1931,8 @@ retry:
wdata->offset = page_offset(wdata->pages[0]);
wdata->pagesz = PAGE_CACHE_SIZE;
wdata->tailsz =
- min(isize - page_offset(wdata->pages[nr_pages - 1]),
+ min(i_size_read(mapping->host) -
+ page_offset(wdata->pages[nr_pages - 1]),
(loff_t)PAGE_CACHE_SIZE);
wdata->bytes = ((nr_pages - 1) * PAGE_CACHE_SIZE) +
wdata->tailsz;
OpenPOWER on IntegriCloud