diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-03-16 11:54:29 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-03-16 15:33:56 +0100 |
commit | 66fac03fae3af9dded964b01c89662819dbfc5c2 (patch) | |
tree | 2d866941dc2ae2b633f62cfeec830e34d1e4c059 /testsuites/fstests | |
parent | psxstrsignal01: New test (diff) | |
download | rtems-66fac03fae3af9dded964b01c89662819dbfc5c2.tar.bz2 |
libio: Fix deadlock in location management
Perform a context-dependent deferred location release to avoid a
deadlock on the file system instance locks, for example during a
chdir().
Update #2936.
Diffstat (limited to 'testsuites/fstests')
-rw-r--r-- | testsuites/fstests/fsnofs01/init.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/testsuites/fstests/fsnofs01/init.c b/testsuites/fstests/fsnofs01/init.c index ff2c2a8075..37ebac1771 100644 --- a/testsuites/fstests/fsnofs01/init.c +++ b/testsuites/fstests/fsnofs01/init.c @@ -74,9 +74,9 @@ static void test_initial_values(void) rtems_test_assert(null_mt->mt_fs_root == null_loc); rtems_test_assert(!null_mt->mounted); rtems_test_assert(!null_mt->writeable); - rtems_test_assert(null_loc->reference_count == 6); + rtems_test_assert(null_loc->reference_count == 4); rtems_test_assert(null_loc->deferred_released_next == NULL); - rtems_test_assert(null_loc->deferred_released_count == 2); + rtems_test_assert(null_loc->deferred_released_count == 0); } static void test_location_obtain(void) @@ -90,7 +90,7 @@ static void test_location_obtain(void) rtems_test_assert(node_count(loc_chain) == 1); rtems_test_assert(null_loc->reference_count == 5); - rtems_filesystem_global_location_release(null_loc); + rtems_filesystem_global_location_release(null_loc, false); rtems_test_assert(node_count(loc_chain) == 1); rtems_test_assert(null_loc->reference_count == 4); @@ -106,7 +106,7 @@ static void test_null_location_obtain(void) rtems_test_assert(node_count(loc_chain) == 1); rtems_test_assert(null_loc->reference_count == 5); - rtems_filesystem_global_location_release(null_loc); + rtems_filesystem_global_location_release(null_loc, false); rtems_test_assert(node_count(loc_chain) == 1); rtems_test_assert(null_loc->reference_count == 4); |