Closed jenswi-linaro closed 1 week ago
Added a comment for ree_fs_dirh
and ree_fs_dirh_refcount
.
Adding @ZheTing815's Reported-by.
Maybe use ree_fs:
(lowercase) as a prefix since it's how subsystems etc. are usually written.
Comment addressed and tag applied.
The counter ree_fs_dirh_refcount is used to determine when ree_fs_dirh should be free, not as a guarantee that ree_fs_dirh is still valid. This wasn't the assumption in ree_fs_readdir_rpc(), ree_fs_closedir_rpc(), and ree_fs_opendir_rpc(). So fix that by using get_dirh() in ree_fs_readdir_rpc as needed.
Fixes: ace6039fd434 ("core: REE_FS: refcount dirfile handle")