Re: [PATCH] zram: drop slot trylock and miss_free

From: Matthew Wilcox

Date: Tue Feb 10 2026 - 09:29:54 EST


On Tue, Feb 10, 2026 at 12:50:37PM +0900, Sergey Senozhatsky wrote:
> @@ -1943,15 +1927,9 @@ static ssize_t debug_stat_show(struct device *dev,
> {
> int version = 1;
> struct zram *zram = dev_to_zram(dev);
> - ssize_t ret;
>
> guard(rwsem_read)(&zram->dev_lock);
> - ret = sysfs_emit(buf,
> - "version: %d\n0 %8llu\n",
> - version,
> - (u64)atomic64_read(&zram->stats.miss_free));
> -
> - return ret;
> + return sysfs_emit(buf, "version: %d\n0 0\n", version);
> }

You don't need the dev_lock any more to just report the version.
And should the version be changed now that you've changed the format to
not include miss_free?