core: REE_FS: avoid deadlock in ree_fs_create()
core: REE_FS: avoid deadlock in ree_fs_create()

ree_fs_close() can't be called in ree_fs_create() cleanup as
ree_fs_close() tries to acquire the mutex already acquired in
ree_fs_create(). Copy relevant content from ree_fs_close() instead.

Reviewed-by: Etienne Carriere <f21bc5b8f3ea1962eb45af359f1abea6578cab94@linaro.org>
Signed-off-by: Jens Wiklander <7706914404370d7502c27a0eff493dcf491feb51@linaro.org>

pascal-brand-st-dev/optee_os,pascal-brand-st-dev/optee_os,pascal-brand-st-dev/optee_os,pascal-brand-st-dev/optee_os,pascal-brand-st-dev/optee_os