Commit
53d6d0d64e96b84b57b7446a787e683312e2a529 changed
profile_open_file() to force a stat() when reusing a profile object,
by setting the last_stat field to 0 on the data object. The last_stat
field is controlled by the data object mutex (unlike the refcount
field, which is controlled by g_shared_trees_mutex). Lock the data
object before setting last_stat.
[ghudson@mit.edu: switched to using profile_update_data_file_locked()
so we don't lock and unlock the data object twice; rewrote commit
message]
ticket: 9184 (new)
}
if (data) {
data->refcount++;
- data->last_stat = 0; /* Make sure to stat when updating. */
k5_mutex_unlock(&g_shared_trees_mutex);
- retval = profile_update_file_data(data, NULL);
+ k5_mutex_lock(&data->lock);
+ data->last_stat = 0; /* Make sure to stat when updating. */
+ retval = profile_update_file_data_locked(data, NULL);
+ k5_mutex_unlock(&data->lock);
free(expanded_filename);
if (retval) {
profile_dereference_data(data);