[PATCH] ubifs: add missing ui pointer in debugging code

Daniel Golle daniel at makrotopia.org
Tue May 13 13:27:58 PDT 2014

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 at makrotopia.org>
 fs/ubifs/file.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/ubifs/file.c b/fs/ubifs/file.c
index 4f34dba..e13ec5e 100644
--- a/fs/ubifs/file.c
+++ b/fs/ubifs/file.c
@@ -903,6 +903,7 @@ static int do_writepage(struct page *page, int len)
 	struct ubifs_info *c = inode->i_sb->s_fs_info;
+	struct ubifs_inode *ui = ubifs_inode(inode);
 	ubifs_assert(page->index <= ui->synced_i_size << PAGE_CACHE_SIZE);

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20140513/494cf1f6/attachment.sig>

More information about the linux-mtd mailing list