Skip to content

Commit

Permalink
ubifs: Massage debug prints wrt. fscrypt
Browse files Browse the repository at this point in the history
If file names are encrypted we can no longer print them.
That's why we have to change these prints or remove them completely.

Signed-off-by: Richard Weinberger <[email protected]>
  • Loading branch information
richardweinberger committed Jul 14, 2017
1 parent 8b2900c commit 35ee314
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 15 deletions.
10 changes: 0 additions & 10 deletions fs/ubifs/journal.c
Original file line number Diff line number Diff line change
Expand Up @@ -549,8 +549,6 @@ int ubifs_jnl_update(struct ubifs_info *c, const struct inode *dir,
struct ubifs_ino_node *ino;
union ubifs_key dent_key, ino_key;

//dbg_jnl("ino %lu, dent '%.*s', data len %d in dir ino %lu",
// inode->i_ino, nm->len, nm->name, ui->data_len, dir->i_ino);
ubifs_assert(mutex_is_locked(&host_ui->ui_mutex));

dlen = UBIFS_DENT_NODE_SZ + fname_len(nm) + 1;
Expand Down Expand Up @@ -956,9 +954,6 @@ int ubifs_jnl_xrename(struct ubifs_info *c, const struct inode *fst_dir,
int twoparents = (fst_dir != snd_dir);
void *p;

//dbg_jnl("dent '%pd' in dir ino %lu between dent '%pd' in dir ino %lu",
// fst_dentry, fst_dir->i_ino, snd_dentry, snd_dir->i_ino);

ubifs_assert(ubifs_inode(fst_dir)->data_len == 0);
ubifs_assert(ubifs_inode(snd_dir)->data_len == 0);
ubifs_assert(mutex_is_locked(&ubifs_inode(fst_dir)->ui_mutex));
Expand Down Expand Up @@ -1100,8 +1095,6 @@ int ubifs_jnl_rename(struct ubifs_info *c, const struct inode *old_dir,
int move = (old_dir != new_dir);
struct ubifs_inode *uninitialized_var(new_ui);

//dbg_jnl("dent '%pd' in dir ino %lu to dent '%pd' in dir ino %lu",
// old_dentry, old_dir->i_ino, new_dentry, new_dir->i_ino);
ubifs_assert(ubifs_inode(old_dir)->data_len == 0);
ubifs_assert(ubifs_inode(new_dir)->data_len == 0);
ubifs_assert(mutex_is_locked(&ubifs_inode(old_dir)->ui_mutex));
Expand Down Expand Up @@ -1493,9 +1486,6 @@ int ubifs_jnl_delete_xattr(struct ubifs_info *c, const struct inode *host,
int sync = IS_DIRSYNC(host);
struct ubifs_inode *host_ui = ubifs_inode(host);

//dbg_jnl("host %lu, xattr ino %lu, name '%s', data len %d",
// host->i_ino, inode->i_ino, nm->name,
// ubifs_inode(inode)->data_len);
ubifs_assert(inode->i_nlink == 0);
ubifs_assert(mutex_is_locked(&host_ui->ui_mutex));

Expand Down
9 changes: 4 additions & 5 deletions fs/ubifs/tnc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1812,7 +1812,7 @@ static int do_lookup_nm(struct ubifs_info *c, const union ubifs_key *key,
int found, n, err;
struct ubifs_znode *znode;

//dbg_tnck(key, "name '%.*s' key ", nm->len, nm->name);
dbg_tnck(key, "key ");
mutex_lock(&c->tnc_mutex);
found = ubifs_lookup_level0(c, key, &znode, &n);
if (!found) {
Expand Down Expand Up @@ -2410,8 +2410,7 @@ int ubifs_tnc_add_nm(struct ubifs_info *c, const union ubifs_key *key,
struct ubifs_znode *znode;

mutex_lock(&c->tnc_mutex);
//dbg_tnck(key, "LEB %d:%d, name '%.*s', key ",
// lnum, offs, nm->len, nm->name);
dbg_tnck(key, "LEB %d:%d, key ", lnum, offs);
found = lookup_level0_dirty(c, key, &znode, &n);
if (found < 0) {
err = found;
Expand Down Expand Up @@ -2645,7 +2644,7 @@ int ubifs_tnc_remove_nm(struct ubifs_info *c, const union ubifs_key *key,
struct ubifs_znode *znode;

mutex_lock(&c->tnc_mutex);
//dbg_tnck(key, "%.*s, key ", nm->len, nm->name);
dbg_tnck(key, "key ");
err = lookup_level0_dirty(c, key, &znode, &n);
if (err < 0)
goto out_unlock;
Expand Down Expand Up @@ -2950,7 +2949,7 @@ struct ubifs_dent_node *ubifs_tnc_next_ent(struct ubifs_info *c,
struct ubifs_zbranch *zbr;
union ubifs_key *dkey;

//dbg_tnck(key, "%s ", nm->name ? (char *)nm->name : "(lowest)");
dbg_tnck(key, "key ");
ubifs_assert(is_hash_key(c, key));

mutex_lock(&c->tnc_mutex);
Expand Down

0 comments on commit 35ee314

Please sign in to comment.