aboutsummaryrefslogtreecommitdiff
path: root/internal/fusefrontend/file.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/fusefrontend/file.go')
-rw-r--r--internal/fusefrontend/file.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/fusefrontend/file.go b/internal/fusefrontend/file.go
index 813f992..b7ff032 100644
--- a/internal/fusefrontend/file.go
+++ b/internal/fusefrontend/file.go
@@ -258,7 +258,7 @@ func (f *File) Read(ctx context.Context, buf []byte, off int64) (resultData fuse
if !(f.rootNode.args.SharedStorage && errno == syscall.EIO) {
return nil, errno
}
- blocks := f.contentEnc.ExplodePlainRange(uint64(off), uint64(len(buf)))
+ blocks := f.rootNode.contentEnc.ExplodePlainRange(uint64(off), uint64(len(buf)))
alignedOffset, alignedLength := blocks[0].JointCiphertextRange(blocks)
if err := f.LockSharedStorage(unix.F_RDLCK, int64(alignedOffset), int64(alignedLength)); err != nil {
tlog.Warn.Printf("ino%d: FUSE Read: LockSharedStorage(F_RDLCK, %d, %d) failed: %v", f.qIno.Ino, alignedOffset, alignedLength, err)