Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a0fd5951 authored by Daniel Golle's avatar Daniel Golle Committed by Artem Bityutskiy
Browse files

UBIFS: add missing ui pointer in debugging code



If UBIFS_DEBUG is defined an additional assertion of the ui_lock
spinlock in do_writepage cannot compile because the ui pointer has not
been previously declared.

Fix this by declaring and initializing the ui pointer in case
UBIFS_DEBUG is defined.

Signed-off-by: default avatarDaniel Golle <daniel@makrotopia.org>
Signed-off-by: default avatarArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
parent 151d6b21
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -903,6 +903,7 @@ static int do_writepage(struct page *page, int len)
	struct ubifs_info *c = inode->i_sb->s_fs_info;

#ifdef UBIFS_DEBUG
	struct ubifs_inode *ui = ubifs_inode(inode);
	spin_lock(&ui->ui_lock);
	ubifs_assert(page->index <= ui->synced_i_size << PAGE_CACHE_SIZE);
	spin_unlock(&ui->ui_lock);