]> git.karo-electronics.de Git - linux-beck.git/commitdiff
UBIFS: add missing ui pointer in debugging code
authorDaniel Golle <daniel@makrotopia.org>
Tue, 13 May 2014 20:27:58 +0000 (22:27 +0200)
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Tue, 27 May 2014 12:23:40 +0000 (15:23 +0300)
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: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
fs/ubifs/file.c

index f7d48a08f44393435e253a706d4d6bbf2d467e15..727506b5e2ea34a30b25b5ef352e5e47611201e2 100644 (file)
@@ -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);