diff options
Diffstat (limited to 'apps/tagcache.c')
-rw-r--r-- | apps/tagcache.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/apps/tagcache.c b/apps/tagcache.c index a5df2f0ad1..14d88bbfb8 100644 --- a/apps/tagcache.c +++ b/apps/tagcache.c | |||
@@ -3068,16 +3068,16 @@ static bool command_queue_is_full(void) | |||
3068 | return (next == command_queue_ridx); | 3068 | return (next == command_queue_ridx); |
3069 | } | 3069 | } |
3070 | 3070 | ||
3071 | static bool command_queue_sync_callback(void) | 3071 | static void command_queue_sync_callback(void *data) |
3072 | { | 3072 | { |
3073 | 3073 | (void)data; | |
3074 | struct master_header myhdr; | 3074 | struct master_header myhdr; |
3075 | int masterfd; | 3075 | int masterfd; |
3076 | 3076 | ||
3077 | mutex_lock(&command_queue_mutex); | 3077 | mutex_lock(&command_queue_mutex); |
3078 | 3078 | ||
3079 | if ( (masterfd = open_master_fd(&myhdr, true)) < 0) | 3079 | if ( (masterfd = open_master_fd(&myhdr, true)) < 0) |
3080 | return false; | 3080 | return; |
3081 | 3081 | ||
3082 | while (command_queue_ridx != command_queue_widx) | 3082 | while (command_queue_ridx != command_queue_widx) |
3083 | { | 3083 | { |
@@ -3092,7 +3092,7 @@ static bool command_queue_sync_callback(void) | |||
3092 | 3092 | ||
3093 | /* Re-open the masterfd. */ | 3093 | /* Re-open the masterfd. */ |
3094 | if ( (masterfd = open_master_fd(&myhdr, true)) < 0) | 3094 | if ( (masterfd = open_master_fd(&myhdr, true)) < 0) |
3095 | return true; | 3095 | return; |
3096 | 3096 | ||
3097 | break; | 3097 | break; |
3098 | } | 3098 | } |
@@ -3111,7 +3111,6 @@ static bool command_queue_sync_callback(void) | |||
3111 | 3111 | ||
3112 | tc_stat.queue_length = 0; | 3112 | tc_stat.queue_length = 0; |
3113 | mutex_unlock(&command_queue_mutex); | 3113 | mutex_unlock(&command_queue_mutex); |
3114 | return true; | ||
3115 | } | 3114 | } |
3116 | 3115 | ||
3117 | static void run_command_queue(bool force) | 3116 | static void run_command_queue(bool force) |
@@ -3120,7 +3119,7 @@ static void run_command_queue(bool force) | |||
3120 | return; | 3119 | return; |
3121 | 3120 | ||
3122 | if (force || command_queue_is_full()) | 3121 | if (force || command_queue_is_full()) |
3123 | command_queue_sync_callback(); | 3122 | command_queue_sync_callback(NULL); |
3124 | else | 3123 | else |
3125 | register_storage_idle_func(command_queue_sync_callback); | 3124 | register_storage_idle_func(command_queue_sync_callback); |
3126 | } | 3125 | } |