Commit 9a7c6b73 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'upstream-3.5-rc5' of git://git.infradead.org/linux-ubifs

Pull ubi/ubifs fixes from Artem Bityutskiy:
 "Fix the debugfs regression - we never enable it because incorrect
  'IS_ENABLED()' macro usage: should be 'IS_ENABLED(CONFIG_DEBUG_FS)',
  but we had 'IS_ENABLED(DEBUG_FS)'.  Also fix incorrect assertion."

* tag 'upstream-3.5-rc5' of git://git.infradead.org/linux-ubifs:
  UBI: correct usage of IS_ENABLED()
  UBIFS: correct usage of IS_ENABLED()
  UBIFS: fix assertion
parents 4a9c4697 903e0e4e
...@@ -264,7 +264,7 @@ static struct dentry *dfs_rootdir; ...@@ -264,7 +264,7 @@ static struct dentry *dfs_rootdir;
*/ */
int ubi_debugfs_init(void) int ubi_debugfs_init(void)
{ {
if (!IS_ENABLED(DEBUG_FS)) if (!IS_ENABLED(CONFIG_DEBUG_FS))
return 0; return 0;
dfs_rootdir = debugfs_create_dir("ubi", NULL); dfs_rootdir = debugfs_create_dir("ubi", NULL);
...@@ -284,7 +284,7 @@ int ubi_debugfs_init(void) ...@@ -284,7 +284,7 @@ int ubi_debugfs_init(void)
*/ */
void ubi_debugfs_exit(void) void ubi_debugfs_exit(void)
{ {
if (IS_ENABLED(DEBUG_FS)) if (IS_ENABLED(CONFIG_DEBUG_FS))
debugfs_remove(dfs_rootdir); debugfs_remove(dfs_rootdir);
} }
...@@ -407,7 +407,7 @@ int ubi_debugfs_init_dev(struct ubi_device *ubi) ...@@ -407,7 +407,7 @@ int ubi_debugfs_init_dev(struct ubi_device *ubi)
struct dentry *dent; struct dentry *dent;
struct ubi_debug_info *d = ubi->dbg; struct ubi_debug_info *d = ubi->dbg;
if (!IS_ENABLED(DEBUG_FS)) if (!IS_ENABLED(CONFIG_DEBUG_FS))
return 0; return 0;
n = snprintf(d->dfs_dir_name, UBI_DFS_DIR_LEN + 1, UBI_DFS_DIR_NAME, n = snprintf(d->dfs_dir_name, UBI_DFS_DIR_LEN + 1, UBI_DFS_DIR_NAME,
...@@ -477,6 +477,6 @@ int ubi_debugfs_init_dev(struct ubi_device *ubi) ...@@ -477,6 +477,6 @@ int ubi_debugfs_init_dev(struct ubi_device *ubi)
*/ */
void ubi_debugfs_exit_dev(struct ubi_device *ubi) void ubi_debugfs_exit_dev(struct ubi_device *ubi)
{ {
if (IS_ENABLED(DEBUG_FS)) if (IS_ENABLED(CONFIG_DEBUG_FS))
debugfs_remove_recursive(ubi->dbg->dfs_dir); debugfs_remove_recursive(ubi->dbg->dfs_dir);
} }
...@@ -2918,7 +2918,7 @@ int dbg_debugfs_init_fs(struct ubifs_info *c) ...@@ -2918,7 +2918,7 @@ int dbg_debugfs_init_fs(struct ubifs_info *c)
struct dentry *dent; struct dentry *dent;
struct ubifs_debug_info *d = c->dbg; struct ubifs_debug_info *d = c->dbg;
if (!IS_ENABLED(DEBUG_FS)) if (!IS_ENABLED(CONFIG_DEBUG_FS))
return 0; return 0;
n = snprintf(d->dfs_dir_name, UBIFS_DFS_DIR_LEN + 1, UBIFS_DFS_DIR_NAME, n = snprintf(d->dfs_dir_name, UBIFS_DFS_DIR_LEN + 1, UBIFS_DFS_DIR_NAME,
...@@ -3013,7 +3013,7 @@ int dbg_debugfs_init_fs(struct ubifs_info *c) ...@@ -3013,7 +3013,7 @@ int dbg_debugfs_init_fs(struct ubifs_info *c)
*/ */
void dbg_debugfs_exit_fs(struct ubifs_info *c) void dbg_debugfs_exit_fs(struct ubifs_info *c)
{ {
if (IS_ENABLED(DEBUG_FS)) if (IS_ENABLED(CONFIG_DEBUG_FS))
debugfs_remove_recursive(c->dbg->dfs_dir); debugfs_remove_recursive(c->dbg->dfs_dir);
} }
...@@ -3099,7 +3099,7 @@ int dbg_debugfs_init(void) ...@@ -3099,7 +3099,7 @@ int dbg_debugfs_init(void)
const char *fname; const char *fname;
struct dentry *dent; struct dentry *dent;
if (!IS_ENABLED(DEBUG_FS)) if (!IS_ENABLED(CONFIG_DEBUG_FS))
return 0; return 0;
fname = "ubifs"; fname = "ubifs";
...@@ -3166,7 +3166,7 @@ int dbg_debugfs_init(void) ...@@ -3166,7 +3166,7 @@ int dbg_debugfs_init(void)
*/ */
void dbg_debugfs_exit(void) void dbg_debugfs_exit(void)
{ {
if (IS_ENABLED(DEBUG_FS)) if (IS_ENABLED(CONFIG_DEBUG_FS))
debugfs_remove_recursive(dfs_rootdir); debugfs_remove_recursive(dfs_rootdir);
} }
......
...@@ -939,8 +939,8 @@ static int find_dirtiest_idx_leb(struct ubifs_info *c) ...@@ -939,8 +939,8 @@ static int find_dirtiest_idx_leb(struct ubifs_info *c)
} }
dbg_find("LEB %d, dirty %d and free %d flags %#x", lp->lnum, lp->dirty, dbg_find("LEB %d, dirty %d and free %d flags %#x", lp->lnum, lp->dirty,
lp->free, lp->flags); lp->free, lp->flags);
ubifs_assert(lp->flags | LPROPS_TAKEN); ubifs_assert(lp->flags & LPROPS_TAKEN);
ubifs_assert(lp->flags | LPROPS_INDEX); ubifs_assert(lp->flags & LPROPS_INDEX);
return lnum; return lnum;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment