diff options
Diffstat (limited to 'libbcachefs/disk_accounting.h')
-rw-r--r-- | libbcachefs/disk_accounting.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libbcachefs/disk_accounting.h b/libbcachefs/disk_accounting.h index cb20f723..4a3d9ff8 100644 --- a/libbcachefs/disk_accounting.h +++ b/libbcachefs/disk_accounting.h @@ -120,7 +120,8 @@ void bch2_accounting_mem_gc(struct bch_fs *); static inline bool bch2_accounting_is_mem(struct disk_accounting_pos acc) { - return acc.type != BCH_DISK_ACCOUNTING_inum; + return acc.type < BCH_DISK_ACCOUNTING_TYPE_NR && + acc.type != BCH_DISK_ACCOUNTING_inum; } /* |