cache: do not ignore readonly option
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>master
parent
2dc3e743fd
commit
f8c9a756e3
|
@ -775,6 +775,9 @@ func (sr *immutableRef) Mount(ctx context.Context, readonly bool, s session.Grou
|
|||
defer sr.mu.Unlock()
|
||||
|
||||
if sr.mountCache != nil {
|
||||
if readonly {
|
||||
return setReadonly(sr.mountCache), nil
|
||||
}
|
||||
return sr.mountCache, nil
|
||||
}
|
||||
|
||||
|
@ -1258,6 +1261,9 @@ func (sr *mutableRef) Mount(ctx context.Context, readonly bool, s session.Group)
|
|||
defer sr.mu.Unlock()
|
||||
|
||||
if sr.mountCache != nil {
|
||||
if readonly {
|
||||
return setReadonly(sr.mountCache), nil
|
||||
}
|
||||
return sr.mountCache, nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue