From 832d91b8058c3c716c648701cf93095dd3157541 Mon Sep 17 00:00:00 2001 From: Ayush Ranjan Date: Thu, 24 Sep 2020 13:44:25 -0700 Subject: [vfs] kernfs: Do not hold reference on the inode when opening FD. The FD should hold a reference on the dentry they were opened on which in turn holds a reference on the inode it points to. PiperOrigin-RevId: 333589223 --- pkg/sentry/fsimpl/kernfs/kernfs.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkg/sentry/fsimpl/kernfs/kernfs.go') diff --git a/pkg/sentry/fsimpl/kernfs/kernfs.go b/pkg/sentry/fsimpl/kernfs/kernfs.go index c4e914530..f543a2065 100644 --- a/pkg/sentry/fsimpl/kernfs/kernfs.go +++ b/pkg/sentry/fsimpl/kernfs/kernfs.go @@ -350,7 +350,7 @@ type Inode interface { // Open creates a file description for the filesystem object represented by // this inode. The returned file description should hold a reference on the - // inode for its lifetime. + // dentry for its lifetime. // // Precondition: rp.Done(). vfsd.Impl() must be the kernfs Dentry containing // the inode on which Open() is being called. -- cgit v1.2.3