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

Commit ba6a7d55 authored by Artem Bityutskiy's avatar Artem Bityutskiy
Browse files

UBIFS: fix debugging check



The debugging check which verifies that we never write outside of the file
length was incorrect, since it was multiplying file length by the page size,
instead of dividing. Fix this.

Spotted-by: default avatarhujianyang <hujianyang@huawei.com>
Signed-off-by: default avatarArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
parent a0fd5951
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -905,7 +905,7 @@ static int do_writepage(struct page *page, int len)
#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);
	ubifs_assert(page->index <= ui->synced_i_size >> PAGE_CACHE_SHIFT);
	spin_unlock(&ui->ui_lock);
#endif