nfs4: Remove unused entries from inode number to filehandle map
This commit is contained in:
@@ -19,6 +19,7 @@ class InodeIdMap {
|
|||||||
public:
|
public:
|
||||||
inline status_t AddEntry(const FileInfo& fi,
|
inline status_t AddEntry(const FileInfo& fi,
|
||||||
ino_t id);
|
ino_t id);
|
||||||
|
inline status_t RemoveEntry(ino_t id);
|
||||||
inline status_t GetFileInfo(FileInfo* fi, ino_t id);
|
inline status_t GetFileInfo(FileInfo* fi, ino_t id);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -34,6 +35,13 @@ InodeIdMap::AddEntry(const FileInfo& fi, ino_t id)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline status_t
|
||||||
|
InodeIdMap::RemoveEntry(ino_t id)
|
||||||
|
{
|
||||||
|
return fMap.Remove(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
inline status_t
|
inline status_t
|
||||||
InodeIdMap::GetFileInfo(FileInfo* fi, ino_t id)
|
InodeIdMap::GetFileInfo(FileInfo* fi, ino_t id)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -197,6 +197,7 @@ static status_t
|
|||||||
nfs4_put_vnode(fs_volume* volume, fs_vnode* vnode, bool reenter)
|
nfs4_put_vnode(fs_volume* volume, fs_vnode* vnode, bool reenter)
|
||||||
{
|
{
|
||||||
Inode* inode = reinterpret_cast<Inode*>(vnode->private_node);
|
Inode* inode = reinterpret_cast<Inode*>(vnode->private_node);
|
||||||
|
inode->FileSystem()->InoIdMap()->RemoveEntry(inode->ID());
|
||||||
delete inode;
|
delete inode;
|
||||||
|
|
||||||
return B_OK;
|
return B_OK;
|
||||||
|
|||||||
Reference in New Issue
Block a user