File tree Expand file tree Collapse file tree 1 file changed +0
-19
lines changed
Expand file tree Collapse file tree 1 file changed +0
-19
lines changed Original file line number Diff line number Diff line change @@ -636,22 +636,3 @@ pub fn incref_root() {
636636 panic ! ( "Root directory inode was not a directory" ) ;
637637 }
638638}
639-
640- pub fn decref_dir ( cwd_container : & interface:: RustPathBuf ) {
641- if let Some ( cwdinodenum) = metawalk ( & cwd_container) {
642- if let Inode :: Dir ( ref mut cwddir) = * ( FS_METADATA . inodetable . get_mut ( & cwdinodenum) . unwrap ( ) )
643- {
644- cwddir. refcount -= 1 ;
645-
646- //if the directory has been removed but this cwd was the last open handle to it
647- if cwddir. refcount == 0 && cwddir. linkcount == 0 {
648- FS_METADATA . inodetable . remove ( & cwdinodenum) ;
649- }
650- } else {
651- panic ! ( "Cage had a cwd that was not a directory!" ) ;
652- }
653- } else {
654- panic ! ( "Cage had a cwd which did not exist!" ) ;
655- } //we probably want to handle this case, maybe cwd should be an inode
656- // number?? Not urgent
657- }
You can’t perform that action at this time.
0 commit comments