Skip to content

Commit

Permalink
feat/acl: fix lint
Browse files Browse the repository at this point in the history
Signed-off-by: jiefeng <[email protected]>
  • Loading branch information
jiefenghuang committed Mar 4, 2024
1 parent fd7deb2 commit 6fc7594
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/meta/redis.go
Original file line number Diff line number Diff line change
Expand Up @@ -4663,7 +4663,7 @@ func (m *redisMeta) getACL(ctx Context, tx *redis.Tx, id uint32, rule *aclAPI.Ru
}

func (m *redisMeta) insertACL(ctx Context, tx *redis.Tx, rule *aclAPI.Rule) (uint32, error) {
var aclId uint32 = aclAPI.None
var aclId uint32
if aclId = m.aclCache.GetId(rule); aclId == aclAPI.None {
// TODO failures may result in some id wastage.
newId, err := m.incrCounter(ACLCounterName, 1)
Expand Down
2 changes: 1 addition & 1 deletion pkg/meta/sql.go
Original file line number Diff line number Diff line change
Expand Up @@ -4301,7 +4301,7 @@ func (m *dbMeta) doTouchAtime(ctx Context, inode Ino, attr *Attr, now time.Time)
}

func (m *dbMeta) insertACL(s *xorm.Session, rule *aclAPI.Rule) (uint32, error) {
var aclId uint32 = aclAPI.None
var aclId uint32
if aclId = m.aclCache.GetId(rule); aclId == aclAPI.None {
// TODO conflicts from multiple clients are rare and result in only minor duplicates, thus not addressed for now.
val := newSQLAcl(rule)
Expand Down
2 changes: 1 addition & 1 deletion pkg/meta/tkv.go
Original file line number Diff line number Diff line change
Expand Up @@ -3762,7 +3762,7 @@ func (m *kvMeta) GetFacl(ctx Context, ino Ino, aclType uint8, rule *aclAPI.Rule)
}

func (m *kvMeta) insertACL(tx *kvTxn, rule *aclAPI.Rule) (uint32, error) {
var aclId uint32 = aclAPI.None
var aclId uint32
if aclId = m.aclCache.GetId(rule); aclId == aclAPI.None {
newId, err := m.incrCounter(ACLCounterName, 1)
if err != nil {
Expand Down

0 comments on commit 6fc7594

Please sign in to comment.