Fix a logic bug around setting both a mount default and max at the same time. Ping #688.

This commit is contained in:
Jeff Mitchell 2015-10-12 14:57:43 -04:00
parent a9155ef85e
commit ed6ce1c53e
1 changed files with 1 additions and 1 deletions

View File

@ -39,7 +39,7 @@ func (b *SystemBackend) tuneMountTTLs(path string, meConfig *MountConfig, newDef
if newDefault != nil {
if meConfig.MaxLeaseTTL == 0 {
if *newDefault > b.Core.maxLeaseTTL {
if newMax == nil && *newDefault > b.Core.maxLeaseTTL {
return fmt.Errorf("new backend default lease TTL of %d greater than system max lease TTL of %d",
int(newDefault.Seconds()), int(b.Core.maxLeaseTTL.Seconds()))
}