linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ubifs: add missing ui pointer in debugging code
@ 2014-05-13 20:27 Daniel Golle
  2014-05-14  7:32 ` hujianyang
  2014-05-27 12:27 ` Artem Bityutskiy
  0 siblings, 2 replies; 7+ messages in thread
From: Daniel Golle @ 2014-05-13 20:27 UTC (permalink / raw)
  To: Artem Bityutskiy, linux-mtd

[-- Attachment #1: Type: text/plain, Size: 836 bytes --]

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>
---
 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;
 
 #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);
-- 
1.9.2


[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-05-28  8:05 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-13 20:27 [PATCH] ubifs: add missing ui pointer in debugging code Daniel Golle
2014-05-14  7:32 ` hujianyang
2014-05-15 15:54   ` Daniel
2014-05-27 12:28   ` Artem Bityutskiy
2014-05-28  2:27     ` hujianyang
2014-05-28  8:04       ` Artem Bityutskiy
2014-05-27 12:27 ` Artem Bityutskiy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).