chore: remove repetitive words in comments

Signed-off-by: dongjinlong <dongjinlong@outlook.com>
This commit is contained in:
dongjinlong
2024-03-26 19:57:40 +08:00
parent cc37e536cb
commit ba02461e12
22 changed files with 23 additions and 23 deletions
+1 -1
View File
@@ -87,7 +87,7 @@ new syscalls:
An `io_uring` request is effectively an opcode specifying the I/O operation to
perform, and corresponding arguments. The opcodes and arguments closely relate
to the the corresponding synchronous I/O syscall. In addition, there are some
to the corresponding synchronous I/O syscall. In addition, there are some
`io_uring`-specific arguments that specify things like how to process requests,
how to interpret the arguments and communicate the status of the ring buffers.
+1 -1
View File
@@ -303,7 +303,7 @@ func (b *Bitmap) ToSlice() []uint32 {
return bitmapSlice
}
// GetNumOnes return the the number of ones in the Bitmap.
// GetNumOnes return the number of ones in the Bitmap.
func (b *Bitmap) GetNumOnes() uint32 {
return b.numOnes
}
+1 -1
View File
@@ -75,7 +75,7 @@ func (rg *RNG) Int63n(n int64) int64 {
// - The remaining 20% map to the themselves - 2 * (maximum int64),
// i.e. the first half of possible output values.
//
// And thus 60% of results map the the first half of possible output
// And thus 60% of results map the first half of possible output
// values, and 40% map the second half. Oops!
//
// We use the same trick as Go to deal with this: shave off the last
+1 -1
View File
@@ -58,7 +58,7 @@ type queue struct {
// so readable must be checked.
readable bool
// transform is the the queue's function for transforming bytes
// transform is the queue's function for transforming bytes
// entering the queue. For example, transform might convert all '\r's
// entering the queue to '\n's.
transformer
+1 -1
View File
@@ -53,7 +53,7 @@ type filesystemOptions struct {
// gid of the mount owner.
gid auth.KGID
// rootMode specifies the the file mode of the filesystem's root.
// rootMode specifies the file mode of the filesystem's root.
rootMode linux.FileMode
// maxActiveRequests specifies the maximum number of active requests that can
+1 -1
View File
@@ -742,7 +742,7 @@ type inodeRefs interface {
type inodeMetadata interface {
// CheckPermissions checks that creds may access this inode for the
// requested access type, per the the rules of
// requested access type, per the rules of
// fs/namei.c:generic_permission().
CheckPermissions(ctx context.Context, creds *auth.Credentials, ats vfs.AccessTypes) error
+2 -2
View File
@@ -194,7 +194,7 @@ func (r *Registry) newQueueLocked(ctx context.Context, key ipc.Key, creds *auth.
// Remove removes the queue with specified ID. All waiters (readers and
// writers) and writers will be awakened and fail. Remove will return an error
// if the ID is invalid, or the the user doesn't have privileges.
// if the ID is invalid, or the user doesn't have privileges.
func (r *Registry) Remove(id ipc.ID, creds *auth.Credentials) error {
r.mu.Lock()
defer r.mu.Unlock()
@@ -491,7 +491,7 @@ func (q *Queue) msgOfType(mType int64, except bool) *Message {
return nil
}
// msgOfTypeLessThan return the the first message with the lowest type less
// msgOfTypeLessThan return the first message with the lowest type less
// than or equal to mType, nil if no such message exists.
//
// Precondition: caller must hold q.mu.
+1 -1
View File
@@ -84,7 +84,7 @@ type TaskConfig struct {
// MountNamespace is the MountNamespace of the new task.
MountNamespace *vfs.MountNamespace
// RSeqAddr is a pointer to the the userspace linux.RSeq structure.
// RSeqAddr is a pointer to the userspace linux.RSeq structure.
RSeqAddr hostarch.Addr
// RSeqSignature is the signature that the rseq abort IP must be signed
+1 -1
View File
@@ -96,7 +96,7 @@ func (q *contextQueue) queuedContexts() uint32 {
return (atomic.LoadUint32(&q.end) + maxContextQueueEntries - atomic.LoadUint32(&q.start)) % maxContextQueueEntries
}
// add puts the the given ctx onto the context queue, and records a state of
// add puts the given ctx onto the context queue, and records a state of
// the subprocess after insertion to see if there are more active stub threads
// or more waiting contexts.
func (q *contextQueue) add(ctx *sharedContext) *platform.ContextError {
+1 -1
View File
@@ -1532,7 +1532,7 @@ func manglePath(p string) string {
return r.Replace(p)
}
// superBlockOpts returns the super block options string for the the mount at
// superBlockOpts returns the super block options string for the mount at
// the given path.
func superBlockOpts(mountPath string, mnt *Mount) string {
// Compose super block options by combining global mount flags with
+1 -1
View File
@@ -104,7 +104,7 @@ func (b NDPNeighborAdvert) SetOverrideFlag(f bool) {
}
}
// Options returns an NDPOptions of the the options body.
// Options returns an NDPOptions of the options body.
func (b NDPNeighborAdvert) Options() NDPOptions {
return NDPOptions(b[ndpNAOptionsOffset:])
}
+1 -1
View File
@@ -46,7 +46,7 @@ func (b NDPNeighborSolicit) SetTargetAddress(addr tcpip.Address) {
copy(b[ndpNSTargetAddessOffset:][:IPv6AddressSize], addr.AsSlice())
}
// Options returns an NDPOptions of the the options body.
// Options returns an NDPOptions of the options body.
func (b NDPNeighborSolicit) Options() NDPOptions {
return NDPOptions(b[ndpNSOptionsOffset:])
}
+1 -1
View File
@@ -198,7 +198,7 @@ func (b NDPRouterAdvert) RetransTimer() time.Duration {
return time.Millisecond * time.Duration(binary.BigEndian.Uint32(b[ndpRARetransTimerOffset:]))
}
// Options returns an NDPOptions of the the options body.
// Options returns an NDPOptions of the options body.
func (b NDPRouterAdvert) Options() NDPOptions {
return NDPOptions(b[ndpRAOptionsOffset:])
}
+1 -1
View File
@@ -30,7 +30,7 @@ const (
ndpRSOptionsOffset = 4
)
// Options returns an NDPOptions of the the options body.
// Options returns an NDPOptions of the options body.
func (b NDPRouterSolicit) Options() NDPOptions {
return NDPOptions(b[ndpRSOptionsOffset:])
}
@@ -1596,7 +1596,7 @@ func TestQueuedPackets(t *testing.T) {
t.Errorf("mockMulticastGroupProtocol mismatch (-want +got):\n%s", diff)
}
// Receiving a report should should transition us into the idle member state,
// Receiving a report should transition us into the idle member state,
// even if we had a packet queued. We should no longer have any packets to
// send.
mgp.handleReport(addr1)
+1 -1
View File
@@ -97,7 +97,7 @@ type handshake struct {
// hit.
deferAccept time.Duration
// acked is true if the the final ACK for a 3-way handshake has
// acked is true if the final ACK for a 3-way handshake has
// been received. This is required to stop retransmitting the
// original SYN-ACK when deferAccept is enabled.
acked bool
+1 -1
View File
@@ -290,7 +290,7 @@ func NewSpecWithArgs(args ...string) *specs.Spec {
},
// Root is readonly, but many tests want to write to tmpdir.
// This creates a writable mount inside the root. Also, when tmpdir points
// to "/tmp", it makes the the actual /tmp to be mounted and not a tmpfs
// to "/tmp", it makes the actual /tmp to be mounted and not a tmpfs
// inside the sentry.
{
Type: "bind",
+1 -1
View File
@@ -700,7 +700,7 @@ func adjustMountOptions(conf *config.Config, path string, opts []string) ([]stri
// setFlags sets sync FD flags on the given FlagSet.
func (g *goferSyncFDs) setFlags(f *flag.FlagSet) {
f.IntVar(&g.nvproxyFD, "sync-nvproxy-fd", -1, "file descriptor that the gofer waits on until nvproxy setup is done")
f.IntVar(&g.usernsFD, "sync-userns-fd", -1, "file descriptor the the gofer waits on until userns mappings are set up")
f.IntVar(&g.usernsFD, "sync-userns-fd", -1, "file descriptor the gofer waits on until userns mappings are set up")
f.IntVar(&g.procMountFD, "proc-mount-sync-fd", -1, "file descriptor that the gofer writes to when /proc isn't needed anymore and can be unmounted")
}
+1 -1
View File
@@ -254,7 +254,7 @@ func fixSpec(spec *specs.Spec, bundleDir string, conf *config.Config) error {
}
} else if len(containerName) > 0 {
// If we know the container name, then check to see if seccomp
// instructions were given to the the container.
// instructions were given to the container.
if annotation == annotationSeccomp+containerName && val == annotationSeccompRuntimeDefault {
// Container seccomp rules are redundant when using gVisor, so remove
// them when seccomp is set to RuntimeDefault.
+1 -1
View File
@@ -19,7 +19,7 @@ set -euf -x -o pipefail
readonly runsc="$1"
readonly version=$($runsc --version)
# Version should should not match VERSION, which is the default and which
# Version should not match VERSION, which is the default and which
# will also appear if something is wrong with workspace_status.sh script.
if [[ $version =~ "VERSION" ]]; then
echo "FAIL: Got bad version $version"

Some files were not shown because too many files have changed in this diff Show More