Merge release-20200608.0-93-gf40d023ad (automated)
This commit is contained in:
commit
8f2d48b38b
|
@ -124,7 +124,7 @@ func (s *Statx) UnmarshalBytes(src []byte) {
|
|||
// Packed implements marshal.Marshallable.Packed.
|
||||
//go:nosplit
|
||||
func (s *Statx) Packed() bool {
|
||||
return s.Btime.Packed() && s.Ctime.Packed() && s.Mtime.Packed() && s.Atime.Packed()
|
||||
return s.Atime.Packed() && s.Btime.Packed() && s.Ctime.Packed() && s.Mtime.Packed()
|
||||
}
|
||||
|
||||
// MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
|
||||
|
@ -178,7 +178,7 @@ func (s *Statx) CopyOut(task marshal.Task, addr usermem.Addr) (int, error) {
|
|||
// CopyIn implements marshal.Marshallable.CopyIn.
|
||||
//go:nosplit
|
||||
func (s *Statx) CopyIn(task marshal.Task, addr usermem.Addr) (int, error) {
|
||||
if !s.Mtime.Packed() && s.Atime.Packed() && s.Btime.Packed() && s.Ctime.Packed() {
|
||||
if !s.Atime.Packed() && s.Btime.Packed() && s.Ctime.Packed() && s.Mtime.Packed() {
|
||||
// Type Statx doesn't have a packed layout in memory, fall back to UnmarshalBytes.
|
||||
buf := task.CopyScratchBuffer(s.SizeBytes()) // escapes: okay.
|
||||
length, err := task.CopyInBytes(addr, buf) // escapes: okay.
|
||||
|
@ -204,7 +204,7 @@ func (s *Statx) CopyIn(task marshal.Task, addr usermem.Addr) (int, error) {
|
|||
|
||||
// WriteTo implements io.WriterTo.WriteTo.
|
||||
func (s *Statx) WriteTo(w io.Writer) (int64, error) {
|
||||
if !s.Mtime.Packed() && s.Atime.Packed() && s.Btime.Packed() && s.Ctime.Packed() {
|
||||
if !s.Atime.Packed() && s.Btime.Packed() && s.Ctime.Packed() && s.Mtime.Packed() {
|
||||
// Type Statx doesn't have a packed layout in memory, fall back to MarshalBytes.
|
||||
buf := make([]byte, s.SizeBytes())
|
||||
s.MarshalBytes(buf)
|
||||
|
|
|
@ -1196,7 +1196,8 @@ func (fs *filesystem) RenameAt(ctx context.Context, rp *vfs.ResolvingPath, oldPa
|
|||
if newParent.cachedMetadataAuthoritative() {
|
||||
newParent.dirents = nil
|
||||
newParent.touchCMtime()
|
||||
if renamed.isDir() {
|
||||
if renamed.isDir() && (replaced == nil || !replaced.isDir()) {
|
||||
// Increase the link count if we did not replace another directory.
|
||||
newParent.incLinks()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue