summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/kernel/fd_table.go
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2021-01-21 01:11:18 +0000
committergVisor bot <gvisor-bot@google.com>2021-01-21 01:11:18 +0000
commita7becb10fbc00f9c75373b07052f0497ed84cd30 (patch)
treea93252f882654795efdf8eab57f78e0fafd9da1c /pkg/sentry/kernel/fd_table.go
parent23a86430206216c66c66daac9a928a363cd0bcf5 (diff)
parent55332aca95a55378957f89a10f21d9d1714070a5 (diff)
Merge release-20210112.0-51-g55332aca9 (automated)
Diffstat (limited to 'pkg/sentry/kernel/fd_table.go')
-rw-r--r--pkg/sentry/kernel/fd_table.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/pkg/sentry/kernel/fd_table.go b/pkg/sentry/kernel/fd_table.go
index 7aba31587..97aa679ed 100644
--- a/pkg/sentry/kernel/fd_table.go
+++ b/pkg/sentry/kernel/fd_table.go
@@ -153,9 +153,8 @@ func (f *FDTable) drop(ctx context.Context, file *fs.File) {
// dropVFS2 drops the table reference.
func (f *FDTable) dropVFS2(ctx context.Context, file *vfs.FileDescription) {
- // Release any POSIX lock possibly held by the FDTable. Range {0, 0} means the
- // entire file.
- err := file.UnlockPOSIX(ctx, f, 0, 0, linux.SEEK_SET)
+ // Release any POSIX lock possibly held by the FDTable.
+ err := file.UnlockPOSIX(ctx, f, lock.LockRange{0, lock.LockEOF})
if err != nil && err != syserror.ENOLCK {
panic(fmt.Sprintf("UnlockPOSIX failed: %v", err))
}