-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Virtfs_vget_common() should add virtfs_node to virtfs_session only when the vnode is verified otherwise it makes the error handler has a chance to free fid which should be avoided since callers of virtfs_vget_common will also free fid if callee returned errors. Also, virtfs_reload_stats_dotl(no vput), insmntque(doing vput) and vfs_hash_insert(some cases doing vput) have different ways to release vnode. They need to be handled separately in the error handler. In addition, the error handler should dispose virtfs_node first then do vput vnode to avoid free id here. Besides, if *vpp != NULL, it means vp2 from the hash table is retrieved and the latest vp isn't inserted to the hash table. It's not what we want. It should go to the error handler. The last, reorder the flag VIRTFS_NODE_IN_SESSION check in the beginning of virtfs_cleanup to make sure each virtfs_node in the session only clean up fid , vp , and etc once. Change-Id: I48b772498fee6785895aaccd990baf057aee3c70
- Loading branch information
joyu
authored and
Kumara Babu Narayanaswamy
committed
Oct 21, 2022
1 parent
7cd2de0
commit fc7d546
Showing
2 changed files
with
35 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters