diff options
author | Richard Weinberger <richard@nod.at> | 2018-07-12 07:01:57 -0400 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2018-08-14 18:25:21 -0400 |
commit | 6eb61d587f4515e4be5669eff383c0185009954f (patch) | |
tree | a5d3183e104338319152a888e0ff980c2546e6e1 /fs/ubifs/commit.c | |
parent | 54169ddd382d461f7c01cc5a5182a4b4bc539489 (diff) |
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/commit.c')
-rw-r--r-- | fs/ubifs/commit.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/ubifs/commit.c b/fs/ubifs/commit.c index 63f56619991d..591f2c7a48f0 100644 --- a/fs/ubifs/commit.c +++ b/fs/ubifs/commit.c | |||
@@ -91,9 +91,9 @@ static int nothing_to_commit(struct ubifs_info *c) | |||
91 | if (c->nroot && test_bit(DIRTY_CNODE, &c->nroot->flags)) | 91 | if (c->nroot && test_bit(DIRTY_CNODE, &c->nroot->flags)) |
92 | return 0; | 92 | return 0; |
93 | 93 | ||
94 | ubifs_assert(atomic_long_read(&c->dirty_zn_cnt) == 0); | 94 | ubifs_assert(c, atomic_long_read(&c->dirty_zn_cnt) == 0); |
95 | ubifs_assert(c->dirty_pn_cnt == 0); | 95 | ubifs_assert(c, c->dirty_pn_cnt == 0); |
96 | ubifs_assert(c->dirty_nn_cnt == 0); | 96 | ubifs_assert(c, c->dirty_nn_cnt == 0); |
97 | 97 | ||
98 | return 1; | 98 | return 1; |
99 | } | 99 | } |
@@ -113,7 +113,7 @@ static int do_commit(struct ubifs_info *c) | |||
113 | struct ubifs_lp_stats lst; | 113 | struct ubifs_lp_stats lst; |
114 | 114 | ||
115 | dbg_cmt("start"); | 115 | dbg_cmt("start"); |
116 | ubifs_assert(!c->ro_media && !c->ro_mount); | 116 | ubifs_assert(c, !c->ro_media && !c->ro_mount); |
117 | 117 | ||
118 | if (c->ro_error) { | 118 | if (c->ro_error) { |
119 | err = -EROFS; | 119 | err = -EROFS; |