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/sb.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/sb.c')
-rw-r--r-- | fs/ubifs/sb.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/ubifs/sb.c b/fs/ubifs/sb.c index fa0a982a6797..bf17f58908ff 100644 --- a/fs/ubifs/sb.c +++ b/fs/ubifs/sb.c @@ -563,7 +563,7 @@ int ubifs_read_superblock(struct ubifs_info *c) * due to the unavailability of time-travelling equipment. */ if (c->fmt_version > UBIFS_FORMAT_VERSION) { - ubifs_assert(!c->ro_media || c->ro_mount); + ubifs_assert(c, !c->ro_media || c->ro_mount); if (!c->ro_mount || c->ro_compat_version > UBIFS_RO_COMPAT_VERSION) { ubifs_err(c, "on-flash format version is w%d/r%d, but software only supports up to version w%d/r%d", @@ -705,9 +705,9 @@ static int fixup_leb(struct ubifs_info *c, int lnum, int len) { int err; - ubifs_assert(len >= 0); - ubifs_assert(len % c->min_io_size == 0); - ubifs_assert(len < c->leb_size); + ubifs_assert(c, len >= 0); + ubifs_assert(c, len % c->min_io_size == 0); + ubifs_assert(c, len < c->leb_size); if (len == 0) { dbg_mnt("unmap empty LEB %d", lnum); @@ -817,8 +817,8 @@ int ubifs_fixup_free_space(struct ubifs_info *c) int err; struct ubifs_sb_node *sup; - ubifs_assert(c->space_fixup); - ubifs_assert(!c->ro_mount); + ubifs_assert(c, c->space_fixup); + ubifs_assert(c, !c->ro_mount); ubifs_msg(c, "start fixing up free space"); |