diff options
author | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2014-05-27 08:24:39 -0400 |
---|---|---|
committer | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2014-05-28 04:10:09 -0400 |
commit | ba6a7d55634b9ddf119216faef55f2463b17d60b (patch) | |
tree | 38168863021d503094ec8f5d7527527e11bfed76 /fs/ubifs | |
parent | a0fd59511e0a0514d24044a29da0f6144f8600e5 (diff) |
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: hujianyang <hujianyang@huawei.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Diffstat (limited to 'fs/ubifs')
-rw-r--r-- | fs/ubifs/file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ubifs/file.c b/fs/ubifs/file.c index 727506b5e2ea..0ab7f7dfb98b 100644 --- a/fs/ubifs/file.c +++ b/fs/ubifs/file.c | |||
@@ -905,7 +905,7 @@ static int do_writepage(struct page *page, int len) | |||
905 | #ifdef UBIFS_DEBUG | 905 | #ifdef UBIFS_DEBUG |
906 | struct ubifs_inode *ui = ubifs_inode(inode); | 906 | struct ubifs_inode *ui = ubifs_inode(inode); |
907 | spin_lock(&ui->ui_lock); | 907 | spin_lock(&ui->ui_lock); |
908 | ubifs_assert(page->index <= ui->synced_i_size << PAGE_CACHE_SIZE); | 908 | ubifs_assert(page->index <= ui->synced_i_size >> PAGE_CACHE_SHIFT); |
909 | spin_unlock(&ui->ui_lock); | 909 | spin_unlock(&ui->ui_lock); |
910 | #endif | 910 | #endif |
911 | 911 | ||