diff options
-rw-r--r-- | fs/ceph/addr.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c index 21a07187df05..8e8a818cba07 100644 --- a/fs/ceph/addr.c +++ b/fs/ceph/addr.c | |||
@@ -267,6 +267,14 @@ static void finish_read(struct ceph_osd_request *req, struct ceph_msg *msg) | |||
267 | kfree(req->r_pages); | 267 | kfree(req->r_pages); |
268 | } | 268 | } |
269 | 269 | ||
270 | static void ceph_unlock_page_vector(struct page **pages, int num_pages) | ||
271 | { | ||
272 | int i; | ||
273 | |||
274 | for (i = 0; i < num_pages; i++) | ||
275 | unlock_page(pages[i]); | ||
276 | } | ||
277 | |||
270 | /* | 278 | /* |
271 | * start an async read(ahead) operation. return nr_pages we submitted | 279 | * start an async read(ahead) operation. return nr_pages we submitted |
272 | * a read for on success, or negative error code. | 280 | * a read for on success, or negative error code. |
@@ -347,6 +355,7 @@ static int start_read(struct inode *inode, struct list_head *page_list, int max) | |||
347 | return nr_pages; | 355 | return nr_pages; |
348 | 356 | ||
349 | out_pages: | 357 | out_pages: |
358 | ceph_unlock_page_vector(pages, nr_pages); | ||
350 | ceph_release_page_vector(pages, nr_pages); | 359 | ceph_release_page_vector(pages, nr_pages); |
351 | out: | 360 | out: |
352 | ceph_osdc_put_request(req); | 361 | ceph_osdc_put_request(req); |