mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Defer kernfs openflag handling to inode implementations.
Some implementations handle more flags than others, so it doesn't make sense to have one set of rules for all. This change should functionally be a no-op. PiperOrigin-RevId: 502712415
This commit is contained in:
committed by
gVisor bot
parent
d3c86781ab
commit
3c93bb1040
@@ -222,6 +222,8 @@ func (i *rootInode) masterClose(ctx context.Context, t *Terminal) {
|
||||
|
||||
// Open implements kernfs.Inode.Open.
|
||||
func (i *rootInode) Open(ctx context.Context, rp *vfs.ResolvingPath, d *kernfs.Dentry, opts vfs.OpenOptions) (*vfs.FileDescription, error) {
|
||||
opts.Flags &= linux.O_ACCMODE | linux.O_CREAT | linux.O_EXCL | linux.O_TRUNC |
|
||||
linux.O_DIRECTORY | linux.O_NOFOLLOW | linux.O_NONBLOCK | linux.O_NOCTTY
|
||||
fd, err := kernfs.NewGenericDirectoryFD(rp.Mount(), d, &i.OrderedChildren, &i.locks, &opts, kernfs.GenericDirectoryFDOptions{
|
||||
SeekEnd: kernfs.SeekEndStaticEntries,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user