diff options
author | Daniel Golle <daniel@makrotopia.org> | 2014-05-13 16:27:58 -0400 |
---|---|---|
committer | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2014-05-27 08:23:40 -0400 |
commit | a0fd59511e0a0514d24044a29da0f6144f8600e5 (patch) | |
tree | 25cf5a83b7248faf7f77be12edbd7cb5c009c936 | |
parent | 151d6b21f973c585efa052b0ff0fab473ef47831 (diff) |
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: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
-rw-r--r-- | fs/ubifs/file.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/ubifs/file.c b/fs/ubifs/file.c index f7d48a08f443..727506b5e2ea 100644 --- a/fs/ubifs/file.c +++ b/fs/ubifs/file.c | |||
@@ -903,6 +903,7 @@ static int do_writepage(struct page *page, int len) | |||
903 | struct ubifs_info *c = inode->i_sb->s_fs_info; | 903 | struct ubifs_info *c = inode->i_sb->s_fs_info; |
904 | 904 | ||
905 | #ifdef UBIFS_DEBUG | 905 | #ifdef UBIFS_DEBUG |
906 | struct ubifs_inode *ui = ubifs_inode(inode); | ||
906 | spin_lock(&ui->ui_lock); | 907 | spin_lock(&ui->ui_lock); |
907 | ubifs_assert(page->index <= ui->synced_i_size << PAGE_CACHE_SIZE); | 908 | ubifs_assert(page->index <= ui->synced_i_size << PAGE_CACHE_SIZE); |
908 | spin_unlock(&ui->ui_lock); | 909 | spin_unlock(&ui->ui_lock); |