Skip to content

Commit 1b291cb

Browse files
ayushr2gvisor-bot
authored andcommitted
Remove obsolete TODOs related to hard links in gofer.
Hard link support for synthetic files is still not supported in the gofer client. The feature request was asked in #10143. There are clear workarounds for that use-case as specified on the issue. There are no other use cases we know of for synthetic file hard links. So we will close this for now. Fixes #6739 PiperOrigin-RevId: 800956772
1 parent 2f9565b commit 1b291cb

File tree

3 files changed

+0
-5
lines changed

3 files changed

+0
-5
lines changed

pkg/sentry/fsimpl/gofer/directfs_inode.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -583,8 +583,6 @@ func (i *directfsInode) link(target *dentry, name string, d *dentry) (*dentry, e
583583
}
584584
// Note that we don't need to set uid/gid for the new child. This is a hard
585585
// link. The original file already has the right owner.
586-
// TODO(gvisor.dev/issue/6739): Hard linked dentries should share the same
587-
// inode fields.
588586
return i.getCreatedChild(name, auth.NoID /* uid */, auth.NoID /* gid */, false /* isDir */, true /* createDentry */, d)
589587
}
590588

pkg/sentry/fsimpl/gofer/filesystem.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -827,7 +827,6 @@ func (fs *filesystem) LinkAt(ctx context.Context, rp *vfs.ResolvingPath, vd vfs.
827827
return nil, linuxerr.EMLINK
828828
}
829829
if d.inode.isSynthetic() {
830-
// TODO(gvisor.dev/issue/6739): Add synthetic file hard link support.
831830
return nil, linuxerr.EOPNOTSUPP
832831
}
833832
return parent.link(ctx, d, name)

pkg/sentry/fsimpl/gofer/lisafs_inode.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -448,8 +448,6 @@ func (i *lisafsInode) link(ctx context.Context, target *lisafsInode, name string
448448
if err != nil {
449449
return nil, err
450450
}
451-
// TODO(gvisor.dev/issue/6739): Hard linked dentries should share the same
452-
// inode fields.
453451
return i.newChildDentry(ctx, &linkInode, name)
454452
}
455453

0 commit comments

Comments
 (0)