From 856294044bc6ca3959b295aac4acb6337060ece8 Mon Sep 17 00:00:00 2001 From: Jaren Johnston Date: Fri, 15 Jun 2012 08:35:56 +0200 Subject: [PATCH] renamed readable_pages to readonly_pages Signed-off-by: Nikos Mavrogiannopoulos --- authenc.c | 4 ++-- cryptodev_int.h | 4 ++-- zc.c | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/authenc.c b/authenc.c index 122bcfc..ddfaaee 100644 --- a/authenc.c +++ b/authenc.c @@ -75,7 +75,7 @@ static int get_userbuf_tls(struct csession *ses, struct kernel_crypt_auth_op *kc pagecount = PAGECOUNT(caop->dst, kcaop->dst_len); ses->used_pages = pagecount; - ses->readable_pages = 0; + ses->readonly_pages = 0; rc = adjust_sg_array(ses, pagecount); if (rc) @@ -157,7 +157,7 @@ static int get_userbuf_srtp(struct csession *ses, struct kernel_crypt_auth_op *k } ses->used_pages = pagecount; - ses->readable_pages = 0; + ses->readonly_pages = 0; (*auth_sg) = ses->sg; diff --git a/cryptodev_int.h b/cryptodev_int.h index c1d327f..f43aef2 100644 --- a/cryptodev_int.h +++ b/cryptodev_int.h @@ -117,8 +117,8 @@ struct csession { unsigned int array_size; unsigned int used_pages; /* the number of pages that are used */ - /* the number of pages marked as writable (first are the readable) */ - unsigned int readable_pages; + /* the number of pages marked as NOT-writable; they preceed writeables */ + unsigned int readonly_pages; struct page **pages; struct scatterlist *sg; }; diff --git a/zc.c b/zc.c index 11491dc..8f326c0 100644 --- a/zc.c +++ b/zc.c @@ -110,10 +110,10 @@ unsigned int i; if (!PageReserved(ses->pages[i])) SetPageDirty(ses->pages[i]); - if (ses->readable_pages == 0) + if (ses->readonly_pages == 0) flush_dcache_page(ses->pages[i]); else - ses->readable_pages--; + ses->readonly_pages--; page_cache_release(ses->pages[i]); } @@ -163,8 +163,8 @@ int get_userbuf(struct csession *ses, void* __user src, int src_len, } ses->used_pages = pagecount = src_pagecount + dst_pagecount; - if (write_src) ses->readable_pages = 0; - else ses->readable_pages = src_pagecount; + if (write_src) ses->readonly_pages = 0; + else ses->readonly_pages = src_pagecount; if (pagecount > ses->array_size) { rc = adjust_sg_array(ses, pagecount); -- 2.11.4.GIT