--- initial
+++ final
@@ -1,122 +1,122 @@
 int ubifs_jnl_update(struct ubifs_info *c, const struct inode *dir, const struct fscrypt_name *nm, const struct inode *inode, int deletion, int xent) {
   int err, dlen, ilen, len, lnum, ino_offs, dent_offs;
   int aligned_dlen, aligned_ilen, sync = IS_DIRSYNC(dir);
   int last_reference = !!(deletion && inode->i_nlink == 0);
   struct ubifs_inode *ui = ubifs_inode(inode);
   struct ubifs_inode *host_ui = ubifs_inode(dir);
   struct ubifs_dent_node *dent;
   struct ubifs_ino_node *ino;
   union ubifs_key dent_key, ino_key;
-  ubifs_assert(mutex_is_locked(&host_ui->ui_mutex));
+  ubifs_assert(c, mutex_is_locked(&host_ui->ui_mutex));
   dlen = UBIFS_DENT_NODE_SZ + fname_len(nm) + 1;
   ilen = UBIFS_INO_NODE_SZ;
   /*
    * If the last reference to the inode is being deleted, then there is
    * no need to attach and write inode data, it is being deleted anyway.
    * And if the inode is being deleted, no need to synchronize
    * write-buffer even if the inode is synchronous.
    */
   if (!last_reference) {
     ilen += ui->data_len;
     sync |= IS_SYNC(inode);
   }
   aligned_dlen = ALIGN(dlen, 8);
   aligned_ilen = ALIGN(ilen, 8);
   len = aligned_dlen + aligned_ilen + UBIFS_INO_NODE_SZ;
   /* Make sure to also account for extended attributes */
   len += host_ui->data_len;
   dent = kzalloc(len, GFP_NOFS);
   if (!dent) return -ENOMEM;
   /* Make reservation before allocating sequence numbers */
   err = make_reservation(c, BASEHD, len);
   if (err) goto out_free;
   if (!xent) {
     dent->ch.node_type = UBIFS_DENT_NODE;
     if (nm->hash)
       dent_key_init_hash(c, &dent_key, dir->i_ino, nm->hash);
     else
       dent_key_init(c, &dent_key, dir->i_ino, nm);
   } else {
     dent->ch.node_type = UBIFS_XENT_NODE;
     xent_key_init(c, &dent_key, dir->i_ino, nm);
   }
   key_write(c, &dent_key, dent->key);
   dent->inum = deletion ? 0 : cpu_to_le64(inode->i_ino);
   dent->type = get_dent_type(inode->i_mode);
   dent->nlen = cpu_to_le16(fname_len(nm));
   memcpy(dent->name, fname_name(nm), fname_len(nm));
   dent->name[fname_len(nm)] = '\0';
   set_dent_cookie(c, dent);
   zero_dent_node_unused(dent);
   ubifs_prep_grp_node(c, dent, dlen, 0);
   ino = (void *)dent + aligned_dlen;
   pack_inode(c, ino, inode, 0);
   ino = (void *)ino + aligned_ilen;
   pack_inode(c, ino, dir, 1);
   if (last_reference) {
     err = ubifs_add_orphan(c, inode->i_ino);
     if (err) {
       release_head(c, BASEHD);
       goto out_finish;
     }
     ui->del_cmtno = c->cmt_no;
   }
   err = write_head(c, BASEHD, dent, len, &lnum, &dent_offs, sync);
   if (err) goto out_release;
   if (!sync) {
     struct ubifs_wbuf *wbuf = &c->jheads[BASEHD].wbuf;
     ubifs_wbuf_add_ino_nolock(wbuf, inode->i_ino);
     ubifs_wbuf_add_ino_nolock(wbuf, dir->i_ino);
   }
   release_head(c, BASEHD);
   kfree(dent);
   if (deletion) {
     if (nm->hash)
       err = ubifs_tnc_remove_dh(c, &dent_key, nm->minor_hash);
     else
       err = ubifs_tnc_remove_nm(c, &dent_key, nm);
     if (err) goto out_ro;
     err = ubifs_add_dirt(c, lnum, dlen);
   } else
     err = ubifs_tnc_add_nm(c, &dent_key, lnum, dent_offs, dlen, nm);
   if (err) goto out_ro;
   /*
    * Note, we do not remove the inode from TNC even if the last reference
    * to it has just been deleted, because the inode may still be opened.
    * Instead, the inode has been added to orphan lists and the orphan
    * subsystem will take further care about it.
    */
   ino_key_init(c, &ino_key, inode->i_ino);
   ino_offs = dent_offs + aligned_dlen;
   err = ubifs_tnc_add(c, &ino_key, lnum, ino_offs, ilen);
   if (err) goto out_ro;
   ino_key_init(c, &ino_key, dir->i_ino);
   ino_offs += aligned_ilen;
   err = ubifs_tnc_add(c, &ino_key, lnum, ino_offs, UBIFS_INO_NODE_SZ + host_ui->data_len);
   if (err) goto out_ro;
   finish_reservation(c);
   spin_lock(&ui->ui_lock);
   ui->synced_i_size = ui->ui_size;
   spin_unlock(&ui->ui_lock);
   if (xent) {
     spin_lock(&host_ui->ui_lock);
     host_ui->synced_i_size = host_ui->ui_size;
     spin_unlock(&host_ui->ui_lock);
   }
   mark_inode_clean(c, ui);
   mark_inode_clean(c, host_ui);
   return 0;
 out_finish:
   finish_reservation(c);
 out_free:
   kfree(dent);
   return err;
 out_release:
   release_head(c, BASEHD);
   kfree(dent);
 out_ro:
   ubifs_ro_mode(c, err);
   if (last_reference) ubifs_delete_orphan(c, inode->i_ino);
   finish_reservation(c);
   return err;
 }<sep>@@
identifier f,c;
expression e;
@@

f(...,struct ubifs_info *c,...) {
<...
 ubifs_assert(
+             c,
              e)
...>
}