Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修复了ramfs中move_to的bug #673

Merged
merged 8 commits into from
Mar 31, 2024

Conversation

BrahmaMantra
Copy link
Contributor

在kernel init时进行了测试,发现了move_to并未修改parent变量,本次pr修复了这个bug(已测试)

@dragonosbot
Copy link

感谢您的pull request,欢迎加入!🎉 DragonOS社区很兴奋地期待审核您的更改,您将在接下来的两周内收到 @fslongjin (or someone else) 的回复。💬😊

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-等待审查 and S-等待作者修改) stays updated, invoking these commands when appropriate:

  • @dragonosbot author: 审查结束后,PR的作者应检查评论并采取相应行动
  • @dragonosbot review: 作者已完成修改,将此PR提交给reviewer进行审阅,此PR将再次在审阅者队列中排队

@dragonosbot dragonosbot added A-fs Area: 文件系统 S-等待审查 Status: 等待assignee以及相关方的审查。 labels Mar 27, 2024
@fslongjin
Copy link
Member

提交代码之前要使用make fmt进行格式化,并且修改clippy报错的地方。

@fslongjin
Copy link
Member

@dragonosbot author

@dragonosbot dragonosbot added S-等待作者修改 Status: 这正在等待作者的一些操作(例如代码更改或更多信息)。 and removed S-等待审查 Status: 等待assignee以及相关方的审查。 labels Mar 27, 2024

//修改其对父节点的引用
let mut old_inode = old_inode.0.lock();
let target = target.0.lock();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不用对target加锁的,毕竟你在上面已经获取到了Arc

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

要把target从&Arc转换为Weak并赋值给old_inode.parent,好像就只能上锁后去调用self_ref(还是我太菜了)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

只要Arc::downgrade就行。可以问问gpt

@fslongjin fslongjin merged commit 924d64d into DragonOS-Community:master Mar 31, 2024
7 checks passed
@fslongjin
Copy link
Member

#644

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-fs Area: 文件系统 S-等待作者修改 Status: 这正在等待作者的一些操作(例如代码更改或更多信息)。
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants