summaryrefslogtreecommitdiffstats
path: root/xlators/performance/io-cache/src/ioc-inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/performance/io-cache/src/ioc-inode.c')
-rw-r--r--xlators/performance/io-cache/src/ioc-inode.c25
1 files changed, 14 insertions, 11 deletions
diff --git a/xlators/performance/io-cache/src/ioc-inode.c b/xlators/performance/io-cache/src/ioc-inode.c
index 1367a1246..208dbd357 100644
--- a/xlators/performance/io-cache/src/ioc-inode.c
+++ b/xlators/performance/io-cache/src/ioc-inode.c
@@ -36,6 +36,7 @@ void *
str_to_ptr (char *string)
{
void *ptr = NULL;
+
GF_VALIDATE_OR_GOTO ("io-cache", string, out);
ptr = (void *)strtoul (string, NULL, 16);
@@ -122,7 +123,7 @@ ioc_inode_wakeup (call_frame_t *frame, ioc_inode_t *ioc_inode,
ioc_inode_lock (ioc_inode);
{
page_waitq =
- ioc_page_wakeup (waiter_page);
+ __ioc_page_wakeup (waiter_page);
}
ioc_inode_unlock (ioc_inode);
if (page_waitq)
@@ -132,17 +133,19 @@ ioc_inode_wakeup (call_frame_t *frame, ioc_inode_t *ioc_inode,
* page->ready = 0, to avoid double faults
*/
ioc_inode_lock (ioc_inode);
-
- if (waiter_page->ready) {
- waiter_page->ready = 0;
- need_fault = 1;
- } else {
- gf_log (frame->this->name, GF_LOG_TRACE,
- "validate frame(%p) is waiting"
- "for in-transit page = %p",
- frame, waiter_page);
+ {
+ if (waiter_page->ready) {
+ waiter_page->ready = 0;
+ need_fault = 1;
+ } else {
+ gf_log (frame->this->name,
+ GF_LOG_TRACE,
+ "validate frame(%p) is "
+ "waiting for in-transit"
+ " page = %p", frame,
+ waiter_page);
+ }
}
-
ioc_inode_unlock (ioc_inode);
if (need_fault) {