diff options
author | OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> | 2006-11-03 01:07:08 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-11-03 15:27:56 -0500 |
commit | 05ac9d4b3d7eac9e8542c83341a0e22d09aecf8f (patch) | |
tree | 31c631983d7d7e91e92e95b1053800d3e10759a8 | |
parent | 029e332ea717810172e965ec50f942755ad0c58a (diff) |
[PATCH] cifs: ->readpages() fixes
This just ignore the remaining pages, and will fix a forgot put_pages_list().
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Cc: Steven French <sfrench@us.ibm.com>
Cc: Miklos Szeredi <miklos@szeredi.hu>
Cc: Steven Whitehouse <swhiteho@redhat.com>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | fs/cifs/file.c | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/fs/cifs/file.c b/fs/cifs/file.c index 976a691c5a68..7e056b9b49e8 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c | |||
@@ -1806,13 +1806,6 @@ static int cifs_readpages(struct file *file, struct address_space *mapping, | |||
1806 | } | 1806 | } |
1807 | if ((rc < 0) || (smb_read_data == NULL)) { | 1807 | if ((rc < 0) || (smb_read_data == NULL)) { |
1808 | cFYI(1, ("Read error in readpages: %d", rc)); | 1808 | 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; | 1809 | break; |
1817 | } else if (bytes_read > 0) { | 1810 | } else if (bytes_read > 0) { |
1818 | pSMBr = (struct smb_com_read_rsp *)smb_read_data; | 1811 | pSMBr = (struct smb_com_read_rsp *)smb_read_data; |
@@ -1831,13 +1824,7 @@ static int cifs_readpages(struct file *file, struct address_space *mapping, | |||
1831 | this case is ok - if we are at server EOF | 1824 | this case is ok - if we are at server EOF |
1832 | we will hit it on next read */ | 1825 | we will hit it on next read */ |
1833 | 1826 | ||
1834 | /* while (!list_empty(page_list) && (i < num_pages)) { | 1827 | /* 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 | } | 1828 | } |
1842 | } else { | 1829 | } else { |
1843 | cFYI(1, ("No bytes read (%d) at offset %lld . " | 1830 | cFYI(1, ("No bytes read (%d) at offset %lld . " |
@@ -1845,14 +1832,6 @@ static int cifs_readpages(struct file *file, struct address_space *mapping, | |||
1845 | bytes_read, offset)); | 1832 | bytes_read, offset)); |
1846 | /* BB turn off caching and do new lookup on | 1833 | /* BB turn off caching and do new lookup on |
1847 | file size at server? */ | 1834 | 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; | 1835 | break; |
1857 | } | 1836 | } |
1858 | if (smb_read_data) { | 1837 | if (smb_read_data) { |