Remove Vnode to let the fs use PageCache for itself

This commit is contained in:
LI Qing
2023-09-13 12:07:58 +08:00
committed by Tate, Hongliang Tian
parent aeea333945
commit 98bf3d4845
30 changed files with 483 additions and 533 deletions

View File

@ -18,15 +18,7 @@ impl PartialEq for UnixSocketAddrBound {
fn eq(&self, other: &Self) -> bool {
match (self, other) {
(Self::Abstract(l0), Self::Abstract(r0)) => l0 == r0,
(Self::Path(l0), Self::Path(r0)) => {
let Some(linode) = l0.inode().upgrade() else {
return false;
};
let Some(rinode) = r0.inode().upgrade() else {
return false;
};
Arc::ptr_eq(&linode, &rinode)
}
(Self::Path(l0), Self::Path(r0)) => Arc::ptr_eq(l0.inode(), r0.inode()),
_ => false,
}
}

View File

@ -203,8 +203,8 @@ impl Backlog {
}
fn create_keyable_inode(dentry: &Arc<Dentry>) -> KeyableWeak<dyn Inode> {
let inode = dentry.inode();
KeyableWeak::from(inode)
let weak_inode = Arc::downgrade(dentry.inode());
KeyableWeak::from(weak_inode)
}
pub(super) fn unregister_backlog(addr: &UnixSocketAddrBound) {