diff options
author | Richard Weinberger <richard@nod.at> | 2018-07-12 13:01:57 +0200 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2018-08-15 00:25:21 +0200 |
commit | 6eb61d587f4515e4be5669eff383c0185009954f (patch) | |
tree | a5d3183e104338319152a888e0ff980c2546e6e1 /fs/ubifs/shrinker.c | |
parent | 54169ddd382d461f7c01cc5a5182a4b4bc539489 (diff) | |
download | linux-6eb61d587f4515e4be5669eff383c0185009954f.tar.gz linux-6eb61d587f4515e4be5669eff383c0185009954f.tar.bz2 linux-6eb61d587f4515e4be5669eff383c0185009954f.zip |
ubifs: Pass struct ubifs_info to ubifs_assert()
This allows us to have more context in ubifs_assert()
and take different actions depending on the configuration.
Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'fs/ubifs/shrinker.c')
-rw-r--r-- | fs/ubifs/shrinker.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/ubifs/shrinker.c b/fs/ubifs/shrinker.c index 9d10cbdec2cc..5eb5958723d4 100644 --- a/fs/ubifs/shrinker.c +++ b/fs/ubifs/shrinker.c @@ -73,8 +73,8 @@ static int shrink_tnc(struct ubifs_info *c, int nr, int age, int *contention) struct ubifs_znode *znode, *zprev; time64_t time = ktime_get_seconds(); - ubifs_assert(mutex_is_locked(&c->umount_mutex)); - ubifs_assert(mutex_is_locked(&c->tnc_mutex)); + ubifs_assert(c, mutex_is_locked(&c->umount_mutex)); + ubifs_assert(c, mutex_is_locked(&c->tnc_mutex)); if (!c->zroot.znode || atomic_long_read(&c->clean_zn_cnt) == 0) return 0; @@ -89,7 +89,7 @@ static int shrink_tnc(struct ubifs_info *c, int nr, int age, int *contention) * changed only when the 'c->tnc_mutex' is held. */ zprev = NULL; - znode = ubifs_tnc_levelorder_next(c->zroot.znode, NULL); + znode = ubifs_tnc_levelorder_next(c, c->zroot.znode, NULL); while (znode && total_freed < nr && atomic_long_read(&c->clean_zn_cnt) > 0) { int freed; @@ -125,7 +125,7 @@ static int shrink_tnc(struct ubifs_info *c, int nr, int age, int *contention) else c->zroot.znode = NULL; - freed = ubifs_destroy_tnc_subtree(znode); + freed = ubifs_destroy_tnc_subtree(c, znode); atomic_long_sub(freed, &ubifs_clean_zn_cnt); atomic_long_sub(freed, &c->clean_zn_cnt); total_freed += freed; @@ -136,7 +136,7 @@ static int shrink_tnc(struct ubifs_info *c, int nr, int age, int *contention) break; zprev = znode; - znode = ubifs_tnc_levelorder_next(c->zroot.znode, znode); + znode = ubifs_tnc_levelorder_next(c, c->zroot.znode, znode); cond_resched(); } |