pub fn stat(&self, ctx: &KernelCtx<'_, '_>) -> Stat {
        let inner = self.inner.lock(ctx);
        let st = Stat {
            dev: self.dev as i32,
            ino: self.inum,
            typ: match inner.typ {
                InodeType::None => 0,
                InodeType::Dir => 1,
                InodeType::File => 2,
                InodeType::Device { .. } => 3,
            },
            nlink: inner.nlink,
            _padding: 0,
            size: inner.size as usize,
        };
        inner.free(ctx);
        st
    }
/// Copy stat information from inode.
Copy stat information from inode.
Copy stat information from inode .
pub fn stat(&self, ctx: &KernelCtx<'_, '_>) -> Stat {
        let inner = self.inner.lock(ctx);
        let st = Stat {
            dev: self.dev as i32,
            ino: self.inum,
            typ: match inner.typ {
                InodeType::None => 0,
                InodeType::Dir => 1,
                InodeType::File => 2,
                InodeType::Device { .. } => 3,
            },
            nlink: inner.nlink,
            _padding: 0,
            size: inner.size as usize,
        };
        inner.free(ctx);
        st
    }
pub fn stat ( & self , ctx : & KernelCtx < ' _ , ' _ > ) -> Stat { let inner = self . inner . lock ( ctx ) ; let st = Stat { dev : self . dev as i32 , ino : self . inum , typ : match inner . typ { InodeType :: None => 0 , InodeType :: Dir => 1 , InodeType :: File => 2 , InodeType :: Device { .. } => 3 , } , nlink : inner . nlink , _padding : 0 , size : inner . size as usize , } ; inner . free ( ctx ) ; st }
Copy stat information from inode.
Copy stat information from inode .
&self
ctx
&KernelCtx<'_, '_>
&self
ctx
&KernelCtx<'_, '_>