X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=fs%2Fntfs%2Flogfile.c;h=a34a2e165adcc96a9b9117f983b0094a676493cd;hb=746550cff061581f89c687ada8523670768364f2;hp=6b9547c75ddf66fe88cc18af7376fabcb532d8fe;hpb=86090fcac5e27b630656fe3d963a6b80e26dac44;p=linux-2.6.git diff --git a/fs/ntfs/logfile.c b/fs/ntfs/logfile.c index 6b9547c75..a34a2e165 100644 --- a/fs/ntfs/logfile.c +++ b/fs/ntfs/logfile.c @@ -1,7 +1,7 @@ /* * logfile.c - NTFS kernel journal handling. Part of the Linux-NTFS project. * - * Copyright (c) 2002-2004 Anton Altaparmakov. + * Copyright (c) 2002-2004 Anton Altaparmakov * * This program/include file is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as published @@ -25,6 +25,7 @@ #include #include #include +#include #include "logfile.h" #include "volume.h" @@ -455,7 +456,11 @@ BOOL ntfs_check_logfile(struct inode *log_vi) else log_page_size = PAGE_CACHE_SIZE; log_page_mask = log_page_size - 1; - log_page_bits = ffs(log_page_size) - 1; + /* + * Use generic_ffs() instead of ffs() to enable the compiler to + * optimize log_page_size and log_page_bits into constants. + */ + log_page_bits = generic_ffs(log_page_size) - 1; size &= ~(log_page_size - 1); /* * Ensure the log file is big enough to store at least the two restart