[PATCH] ceph: use fscrypt_finalize_bounce_page() for cleanup

Chao Yu <[email protected]>
Newsgroups org.kernel.vger.ceph-devel,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
Use fscrypt_finalize_bounce_page() to simplify open code, no
functional changes.

Cc: Matthew Wilcox <[email protected]>
Cc: Eric Biggers <[email protected]>
Signed-off-by: Chao Yu <[email protected]>
---
 fs/ceph/addr.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c
index 1454760332ff..5c7099ba0f59 100644
--- a/fs/ceph/addr.c
+++ b/fs/ceph/addr.c
@@ -932,12 +932,8 @@ static void writepages_finish(struct ceph_osd_request *req)
 					   (u64)osd_data->length);
 		total_pages += num_pages;
 		for (j = 0; j < num_pages; j++) {
+			fscrypt_finalize_bounce_page(&osd_data->pages[j]);
 			page = osd_data->pages[j];
-			if (fscrypt_is_bounce_page(page)) {
-				page = fscrypt_pagecache_page(page);
-				fscrypt_free_bounce_page(osd_data->pages[j]);
-				osd_data->pages[j] = page;
-			}
 			BUG_ON(!page);
 			WARN_ON(!PageUptodate(page));
 
-- 
2.49.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.