The value of flags is one of DATA/METADATA/SYSTEM, they must exist at
when add_pinned_bytes is called.
Signed-off-by: Omar Sandoval <osandov@fb.com>
Tested-by: Holger Hoffstätte <holger@applied-asynchrony.com>
Reviewed-by: David Sterba <dsterba@suse.com>
[ added changelog ]
Signed-off-by: David Sterba <dsterba@suse.com>
        }
 
        space_info = __find_space_info(fs_info, flags);
-       BUG_ON(!space_info); /* Logic bug */
+       ASSERT(space_info);
        percpu_counter_add(&space_info->total_bytes_pinned, num_bytes);
 }