diff options
Diffstat (limited to 'fs/cifs/file.c')
-rw-r--r-- | fs/cifs/file.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/fs/cifs/file.c b/fs/cifs/file.c index 62d8bd8f14c0..6449e1aae621 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c | |||
@@ -493,7 +493,7 @@ int cifs_close(struct inode *inode, struct file *file) | |||
493 | if (pTcon) { | 493 | if (pTcon) { |
494 | /* no sense reconnecting to close a file that is | 494 | /* no sense reconnecting to close a file that is |
495 | already closed */ | 495 | already closed */ |
496 | if (pTcon->tidStatus != CifsNeedReconnect) { | 496 | if (!pTcon->need_reconnect) { |
497 | timeout = 2; | 497 | timeout = 2; |
498 | while ((atomic_read(&pSMBFile->wrtPending) != 0) | 498 | while ((atomic_read(&pSMBFile->wrtPending) != 0) |
499 | && (timeout <= 2048)) { | 499 | && (timeout <= 2048)) { |
@@ -1404,7 +1404,10 @@ retry: | |||
1404 | if ((wbc->nr_to_write -= n_iov) <= 0) | 1404 | if ((wbc->nr_to_write -= n_iov) <= 0) |
1405 | done = 1; | 1405 | done = 1; |
1406 | index = next; | 1406 | index = next; |
1407 | } | 1407 | } else |
1408 | /* Need to re-find the pages we skipped */ | ||
1409 | index = pvec.pages[0]->index + 1; | ||
1410 | |||
1408 | pagevec_release(&pvec); | 1411 | pagevec_release(&pvec); |
1409 | } | 1412 | } |
1410 | if (!scanned && !done) { | 1413 | if (!scanned && !done) { |
@@ -1824,7 +1827,7 @@ static int cifs_readpages(struct file *file, struct address_space *mapping, | |||
1824 | pTcon = cifs_sb->tcon; | 1827 | pTcon = cifs_sb->tcon; |
1825 | 1828 | ||
1826 | pagevec_init(&lru_pvec, 0); | 1829 | pagevec_init(&lru_pvec, 0); |
1827 | cFYI(DBG2, ("rpages: num pages %d", num_pages)); | 1830 | cFYI(DBG2, ("rpages: num pages %d", num_pages)); |
1828 | for (i = 0; i < num_pages; ) { | 1831 | for (i = 0; i < num_pages; ) { |
1829 | unsigned contig_pages; | 1832 | unsigned contig_pages; |
1830 | struct page *tmp_page; | 1833 | struct page *tmp_page; |