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

Commit f893afbe authored by Anton Altaparmakov's avatar Anton Altaparmakov Committed by Linus Torvalds
Browse files

[PATCH] NTFS: Critical bug fix (affects MIPS and possibly others)



Many thanks to Pauline Ng for the detailed bug report and analysis!

Signed-off-by: default avatarAnton Altaparmakov <aia21@cantab.net>
Cc: <stable@kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 5d2170ad
Loading
Loading
Loading
Loading
+7 −6
Original line number Diff line number Diff line
@@ -1484,14 +1484,15 @@ static inline void ntfs_flush_dcache_pages(struct page **pages,
		unsigned nr_pages)
{
	BUG_ON(!nr_pages);
	do {
	/*
		 * Warning: Do not do the decrement at the same time as the
		 * call because flush_dcache_page() is a NULL macro on i386
		 * and hence the decrement never happens.
	 * Warning: Do not do the decrement at the same time as the call to
	 * flush_dcache_page() because it is a NULL macro on i386 and hence the
	 * decrement never happens so the loop never terminates.
	 */
	do {
		--nr_pages;
		flush_dcache_page(pages[nr_pages]);
	} while (--nr_pages > 0);
	} while (nr_pages > 0);
}

/**