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.c26
1 files changed, 15 insertions, 11 deletions
diff --git a/xlators/performance/io-cache/src/ioc-inode.c b/xlators/performance/io-cache/src/ioc-inode.c
index e268cac..a305d03 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,9 +123,10 @@ 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)
ioc_waitq_return (page_waitq);
} else {
@@ -132,17 +134,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) {