aboutsummaryrefslogtreecommitdiff
path: root/fs/cifs/file.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-11-17 20:53:31 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2008-11-17 20:53:31 -0800
commit4e14e833ac3b97a4aa8803eea49f899adc5bb5f4 (patch)
treedd052898b27acff7f1e7d1cc41c98a17d6b9f0f1 /fs/cifs/file.c
parent65ecc14a30ad21bed9aabdfd6a2ae1a1aaaa6a00 (diff)
parentb066a48c9532243894f93a06ca5a0ee2cc21a8dc (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6: prevent cifs_writepages() from skipping unwritten pages Fixed parsing of mount options when doing DFS submount [CIFS] Fix check for tcon seal setting and fix oops on failed mount from earlier patch [CIFS] Fix build break cifs: reinstate sharing of tree connections [CIFS] minor cleanup to cifs_mount cifs: reinstate sharing of SMB sessions sans races cifs: disable sharing session and tcon and add new TCP sharing code [CIFS] clean up server protocol handling [CIFS] remove unused list, add new cifs sock list to prepare for mount/umount fix [CIFS] Fix cifs reconnection flags [CIFS] Can't rely on iov length and base when kernel_recvmsg returns error
Diffstat (limited to 'fs/cifs/file.c')
-rw-r--r--fs/cifs/file.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/cifs/file.c b/fs/cifs/file.c
index ead1a3bb025..6449e1aae62 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@ -493,7 +493,7 @@ int cifs_close(struct inode *inode, struct file *file)
if (pTcon) {
/* no sense reconnecting to close a file that is
already closed */
- if (pTcon->tidStatus != CifsNeedReconnect) {
+ if (!pTcon->need_reconnect) {
timeout = 2;
while ((atomic_read(&pSMBFile->wrtPending) != 0)
&& (timeout <= 2048)) {
@@ -1404,7 +1404,10 @@ retry:
if ((wbc->nr_to_write -= n_iov) <= 0)
done = 1;
index = next;
- }
+ } else
+ /* Need to re-find the pages we skipped */
+ index = pvec.pages[0]->index + 1;
+
pagevec_release(&pvec);
}
if (!scanned && !done) {