Skip to content

Commit

Permalink
dm writecache: advance the number of arguments when reporting max_age
Browse files Browse the repository at this point in the history
When reporting the "max_age" value the number of arguments must
advance by two.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Fixes: 3923d48 ("dm writecache: implement gradual cleanup")
Cc: stable@vger.kernel.org # v5.7+
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
  • Loading branch information
Mikulas Patocka authored and Mike Snitzer committed Nov 17, 2020
1 parent a7a10bc commit e5d41cb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/md/dm-writecache.c
Original file line number Diff line number Diff line change
Expand Up @@ -2479,6 +2479,8 @@ static void writecache_status(struct dm_target *ti, status_type_t type,
extra_args += 2;
if (wc->autocommit_time_set)
extra_args += 2;
if (wc->max_age != MAX_AGE_UNSPECIFIED)
extra_args += 2;
if (wc->cleaner)
extra_args++;
if (wc->writeback_fua_set)
Expand Down

0 comments on commit e5d41cb

Please sign in to comment.