diff options
author | Anton Altaparmakov <aia21@cam.ac.uk> | 2006-06-22 23:47:15 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-23 00:05:55 +0200 |
commit | f893afbe1262e27e91234506f72e17716190dd2f (patch) | |
tree | 4352204e9c53e278f7d494d2564f8ae78244feef /fs/ntfs/file.c | |
parent | [PATCH] sparc build breakage (diff) | |
download | linux-f893afbe1262e27e91234506f72e17716190dd2f.tar.xz linux-f893afbe1262e27e91234506f72e17716190dd2f.zip |
[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: Anton Altaparmakov <aia21@cantab.net>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to '')
-rw-r--r-- | fs/ntfs/file.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/fs/ntfs/file.c b/fs/ntfs/file.c index c63a83e8da98..36e1e136bb0c 100644 --- a/fs/ntfs/file.c +++ b/fs/ntfs/file.c @@ -1484,14 +1484,15 @@ static inline void ntfs_flush_dcache_pages(struct page **pages, unsigned nr_pages) { BUG_ON(!nr_pages); + /* + * 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 { - /* - * 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. - */ + --nr_pages; flush_dcache_page(pages[nr_pages]); - } while (--nr_pages > 0); + } while (nr_pages > 0); } /** |