diff options
Diffstat (limited to 'fs/cifs/file.c')
-rw-r--r-- | fs/cifs/file.c | 31 |
1 files changed, 7 insertions, 24 deletions
diff --git a/fs/cifs/file.c b/fs/cifs/file.c index 976a691c5a68..2436ed8fc840 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c | |||
@@ -492,10 +492,14 @@ int cifs_close(struct inode *inode, struct file *file) | |||
492 | the struct would be in each open file, | 492 | the struct would be in each open file, |
493 | but this should give enough time to | 493 | but this should give enough time to |
494 | clear the socket */ | 494 | clear the socket */ |
495 | cERROR(1,("close with pending writes")); | 495 | #ifdef CONFIG_CIFS_DEBUG2 |
496 | cFYI(1,("close delay, write pending")); | ||
497 | #endif /* DEBUG2 */ | ||
496 | msleep(timeout); | 498 | msleep(timeout); |
497 | timeout *= 4; | 499 | timeout *= 4; |
498 | } | 500 | } |
501 | if(atomic_read(&pSMBFile->wrtPending)) | ||
502 | cERROR(1,("close with pending writes")); | ||
499 | rc = CIFSSMBClose(xid, pTcon, | 503 | rc = CIFSSMBClose(xid, pTcon, |
500 | pSMBFile->netfid); | 504 | pSMBFile->netfid); |
501 | } | 505 | } |
@@ -1806,13 +1810,6 @@ static int cifs_readpages(struct file *file, struct address_space *mapping, | |||
1806 | } | 1810 | } |
1807 | if ((rc < 0) || (smb_read_data == NULL)) { | 1811 | if ((rc < 0) || (smb_read_data == NULL)) { |
1808 | cFYI(1, ("Read error in readpages: %d", rc)); | 1812 | cFYI(1, ("Read error in readpages: %d", rc)); |
1809 | /* clean up remaing pages off list */ | ||
1810 | while (!list_empty(page_list) && (i < num_pages)) { | ||
1811 | page = list_entry(page_list->prev, struct page, | ||
1812 | lru); | ||
1813 | list_del(&page->lru); | ||
1814 | page_cache_release(page); | ||
1815 | } | ||
1816 | break; | 1813 | break; |
1817 | } else if (bytes_read > 0) { | 1814 | } else if (bytes_read > 0) { |
1818 | pSMBr = (struct smb_com_read_rsp *)smb_read_data; | 1815 | pSMBr = (struct smb_com_read_rsp *)smb_read_data; |
@@ -1831,13 +1828,7 @@ static int cifs_readpages(struct file *file, struct address_space *mapping, | |||
1831 | this case is ok - if we are at server EOF | 1828 | this case is ok - if we are at server EOF |
1832 | we will hit it on next read */ | 1829 | we will hit it on next read */ |
1833 | 1830 | ||
1834 | /* while (!list_empty(page_list) && (i < num_pages)) { | 1831 | /* break; */ |
1835 | page = list_entry(page_list->prev, | ||
1836 | struct page, list); | ||
1837 | list_del(&page->list); | ||
1838 | page_cache_release(page); | ||
1839 | } | ||
1840 | break; */ | ||
1841 | } | 1832 | } |
1842 | } else { | 1833 | } else { |
1843 | cFYI(1, ("No bytes read (%d) at offset %lld . " | 1834 | cFYI(1, ("No bytes read (%d) at offset %lld . " |
@@ -1845,14 +1836,6 @@ static int cifs_readpages(struct file *file, struct address_space *mapping, | |||
1845 | bytes_read, offset)); | 1836 | bytes_read, offset)); |
1846 | /* BB turn off caching and do new lookup on | 1837 | /* BB turn off caching and do new lookup on |
1847 | file size at server? */ | 1838 | file size at server? */ |
1848 | while (!list_empty(page_list) && (i < num_pages)) { | ||
1849 | page = list_entry(page_list->prev, struct page, | ||
1850 | lru); | ||
1851 | list_del(&page->lru); | ||
1852 | |||
1853 | /* BB removeme - replace with zero of page? */ | ||
1854 | page_cache_release(page); | ||
1855 | } | ||
1856 | break; | 1839 | break; |
1857 | } | 1840 | } |
1858 | if (smb_read_data) { | 1841 | if (smb_read_data) { |