aboutsummaryrefslogtreecommitdiff
path: root/internal/fusefrontend/file_lock.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2026-07-16 20:32:51 +0200
committerJakob Unterwurzacher2026-07-16 22:07:54 +0200
commita95d6ac5818a749db67d34bcbe9a358d403b6a6e (patch)
tree797bc90aca023f1d070e5b1e33e28650bcaebf44 /internal/fusefrontend/file_lock.go
parent29000177b94c6c9aaab97b3f3d8ed5123ed7cf44 (diff)
fusefrontend: sharedstorage: introduce UnlockSharedStorage helper
Diffstat (limited to 'internal/fusefrontend/file_lock.go')
-rw-r--r--internal/fusefrontend/file_lock.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/internal/fusefrontend/file_lock.go b/internal/fusefrontend/file_lock.go
index bb72c52..f440754 100644
--- a/internal/fusefrontend/file_lock.go
+++ b/internal/fusefrontend/file_lock.go
@@ -29,3 +29,8 @@ func (f *File) LockSharedStorage(lkType int16, lkStart int64, lkLen int64) error
}
return unix.FcntlFlock(uintptr(f.intFd()), syscallcompat.F_OFD_SETLKW, &lk)
}
+
+// UnlockSharedStorage calls LockSharedStorage with unix.F_UNLCK.
+func (f *File) UnlockSharedStorage(lkStart int64, lkLen int64) error {
+ return f.LockSharedStorage(unix.F_UNLCK, lkStart, lkLen)
+}