mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
ceph: call __fscache_uncache_page() if readpages fails
If readpages fails, fscache needs to cleanup its internal state. Signed-off-by: Yan, Zheng <zyan@redhat.com>
This commit is contained in:
parent
480ce08a70
commit
368e35857d
1 changed files with 3 additions and 1 deletions
|
@ -276,8 +276,10 @@ static void finish_read(struct ceph_osd_request *req)
|
||||||
for (i = 0; i < num_pages; i++) {
|
for (i = 0; i < num_pages; i++) {
|
||||||
struct page *page = osd_data->pages[i];
|
struct page *page = osd_data->pages[i];
|
||||||
|
|
||||||
if (rc < 0 && rc != -ENOENT)
|
if (rc < 0 && rc != -ENOENT) {
|
||||||
|
ceph_fscache_readpage_cancel(inode, page);
|
||||||
goto unlock;
|
goto unlock;
|
||||||
|
}
|
||||||
if (bytes < (int)PAGE_SIZE) {
|
if (bytes < (int)PAGE_SIZE) {
|
||||||
/* zero (remainder of) page */
|
/* zero (remainder of) page */
|
||||||
int s = bytes < 0 ? 0 : bytes;
|
int s = bytes < 0 ? 0 : bytes;
|
||||||
|
|
Loading…
Add table
Reference in a new issue