mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Don't drop the mountpoint reference in already umounted dead mountpoints.
PiperOrigin-RevId: 599952931
This commit is contained in:
committed by
gVisor bot
parent
63f4364e59
commit
7b151e25d0
@@ -338,9 +338,11 @@ func (vfs *VirtualFilesystem) forgetDeadMountpoint(ctx context.Context, d *Dentr
|
||||
vfs.lockMounts()
|
||||
defer vfs.unlockMounts(ctx)
|
||||
for mnt := range vfs.mountpoints[d] {
|
||||
// If umounted is true, the mount point has already been decrefed by umount
|
||||
// so we don't need to release the reference again here.
|
||||
if mnt.umounted {
|
||||
vfs.mounts.seq.BeginWrite()
|
||||
vfs.delayDecRef(vfs.disconnectLocked(mnt))
|
||||
vfs.disconnectLocked(mnt)
|
||||
vfs.delayDecRef(mnt)
|
||||
vfs.mounts.seq.EndWrite()
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user