Doloops / mcachefs

mcachefs : Simple filesystem-based file cache based on fuse
65 stars 15 forks source link

fix for issue #5 - https://github.com/Doloops/mcachefs/issues/5 #12

Closed hradec closed 5 years ago

hradec commented 5 years ago

after a metadata flush, if we try to close a file descriptor that was open before the flush, and that file have a metadata ID that belongs to a metadata block that was removed by the flush, we have to check for that in mcachefs_metadata_do_get() and return NULL for the corresponding metadata, so the function that requested it can deal with it properly!

this fixes a crash happening in issue #5, since mcachefs_metadata_clean_fh_locked() will now check if the mdata pointer is NULL before trying to use it.

hradec commented 5 years ago

Found a problem with this fix... working on it!