kernel_optimize_test/fs
Coly Li 235772da3e ext4: remove unncessary call mb_find_buddy() in debugging code
In __mb_check_buddy(), look at the code below:
  591         fstart = -1;
  592         buddy = mb_find_buddy(e4b, 0, &max);
  593         for (i = 0; i < max; i++) {
  594                 if (!mb_test_bit(i, buddy)) {
  595                         MB_CHECK_ASSERT(i >= e4b->bd_info->bb_first_free);
  596                         if (fstart == -1) {
  597                                 fragments++;
  598                                 fstart = i;
  599                         }
  600                         continue;
  601                 }
  602                 fstart = -1;
  603                 /* check used bits only */
  604                 for (j = 0; j < e4b->bd_blkbits + 1; j++) {
  605                         buddy2 = mb_find_buddy(e4b, j, &max2);
  606                         k = i >> j;
  607                         MB_CHECK_ASSERT(k < max2);
  608                         MB_CHECK_ASSERT(mb_test_bit(k, buddy2));
  609                 }
  610         }
  611         MB_CHECK_ASSERT(!EXT4_MB_GRP_NEED_INIT(e4b->bd_info));
  612         MB_CHECK_ASSERT(e4b->bd_info->bb_fragments == fragments);
  613
  614         grp = ext4_get_group_info(sb, e4b->bd_group);
  615         buddy = mb_find_buddy(e4b, 0, &max);

On line 592, buddy is fetched by mb_find_buddy() with order 0, between
line 593 to line 615, buddy is not changed, therefore there is
no need to fetch buddy again from mb_find_buddy() with order 0 again.

We can safely remove the second mb_find_buddy() on line 615.

Signed-off-by: Coly Li <bosong.ly@taobao.com>
Cc: Alex Tomas <alex@clusterfs.com>
Cc: Theodore Tso <tytso@google.com>
2011-02-24 13:24:18 -05:00
..
9p
adfs
affs
afs
autofs4 autofs4: clean ->d_release() and autofs4_free_ino() up 2011-01-18 01:21:29 -05:00
befs
bfs
btrfs Merge git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable 2011-02-15 08:00:35 -08:00
cachefiles
ceph Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client 2011-01-28 12:12:58 +10:00
cifs cifs: don't always drop malformed replies on the floor (try #3) 2011-02-11 03:59:12 +00:00
coda
configfs configfs: change depends -> select SYSFS 2011-01-16 21:22:29 +00:00
cramfs
debugfs
devpts
dlm dlm: use single thread workqueues 2011-02-11 16:50:47 -06:00
ecryptfs ecryptfs: remove unnecessary decrypt when extending a file 2011-01-17 13:01:25 -06:00
efs
exofs Revert "exofs: Set i_mapping->backing_dev_info anyway" 2011-02-02 17:53:27 -08:00
exportfs
ext2
ext3 Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs-2.6 2011-01-21 07:33:37 -08:00
ext4 ext4: remove unncessary call mb_find_buddy() in debugging code 2011-02-24 13:24:18 -05:00
fat
freevxfs
fscache
fuse
gfs2 GFS2: Fix error path in gfs2_lookup_by_inum() 2011-01-18 14:49:08 +00:00
hfs
hfsplus hfsplus: fix up a comparism in hfsplus_file_extend 2011-02-03 16:34:18 -07:00
hostfs
hpfs hpfs_setattr error case avoids unlock_kernel 2011-01-17 05:11:37 -05:00
hppfs
hugetlbfs
isofs
jbd
jbd2 jbd2: call __jbd2_log_start_commit with j_state_lock write locked 2011-02-12 08:18:24 -05:00
jffs2 Merge git://git.infradead.org/mtd-2.6 2011-01-17 11:15:30 -08:00
jfs
lockd NLM: Fix "kernel BUG at fs/lockd/host.c:417!" or ".../host.c:283!" 2011-01-25 15:24:47 -05:00
logfs
minix
ncpfs
nfs NFS: NFSv4 readdir loses entries 2011-01-28 13:41:35 -05:00
nfs_common NFS: Prevent memory allocation failure in nfsacl_encode() 2011-01-25 15:24:47 -05:00
nfsd nfsd: break lease on unlink due to rename 2011-02-14 10:35:19 -05:00
nilfs2 nilfs2: fix crash after one superblock became unavailable 2011-01-22 15:22:36 +09:00
nls
notify
ntfs NTFS: Fix invalid pointer dereference in ntfs_mft_record_alloc(). 2011-01-31 12:58:11 +10:00
ocfs2 Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs-2.6 2011-01-21 07:33:37 -08:00
omfs
openpromfs
partitions
proc s390: remove task_show_regs 2011-02-15 07:34:16 -08:00
qnx4
quota
ramfs
reiserfs Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs-2.6 2011-01-21 07:33:37 -08:00
romfs
squashfs squashfs: fix use of uninitialised variable in zlib & xz decompressors 2011-01-26 10:50:05 +10:00
sysfs kconfig: rename CONFIG_EMBEDDED to CONFIG_EXPERT 2011-01-20 17:02:05 -08:00
sysv
ubifs
udf
ufs
xfs xfs: xfs_bmap_add_extent_delay_real should init br_startblock 2011-01-28 09:13:29 -06:00
aio.c aio: check return value of create_workqueue() 2011-01-17 05:12:44 -05:00
anon_inodes.c sanitize vfsmount refcounting changes 2011-01-16 13:47:07 -05:00
attr.c
bad_inode.c
binfmt_aout.c
binfmt_elf_fdpic.c
binfmt_elf.c
binfmt_em86.c
binfmt_flat.c
binfmt_misc.c
binfmt_script.c
binfmt_som.c
bio-integrity.c
bio.c
block_dev.c
buffer.c
char_dev.c
compat_binfmt_elf.c
compat_ioctl.c
compat.c compat: copy missing fields in compat_statfs64 to user 2011-01-17 04:54:38 -05:00
dcache.c fs: fix new dcache.c kernel-doc warnings 2011-01-22 20:32:38 -08:00
dcookies.c
direct-io.c fs/direct-io.c: don't try to allocate more than BIO_MAX_PAGES in a bio 2011-01-20 17:02:05 -08:00
drop_caches.c
eventfd.c
eventpoll.c epoll: epoll_wait() should not use timespec_add_ns() 2011-02-02 16:03:18 -08:00
exec.c vfs: sparse: add __FMODE_EXEC 2011-02-02 16:03:19 -08:00
fcntl.c vfs: sparse: add __FMODE_EXEC 2011-02-02 16:03:19 -08:00
fifo.c
file_table.c CRED: Fix kernel panic upon security_file_alloc() failure. 2011-02-04 10:40:29 -08:00
file.c
filesystems.c
fs_struct.c sanitize vfsmount refcounting changes 2011-01-16 13:47:07 -05:00
fs-writeback.c
generic_acl.c
inode.c
internal.h tidy up around finish_automount() 2011-01-17 01:47:59 -05:00
ioctl.c fs: make block fiemap mapping length at least blocksize long 2011-02-02 16:03:20 -08:00
ioprio.c
Kconfig kconfig: rename CONFIG_EMBEDDED to CONFIG_EXPERT 2011-01-20 17:02:05 -08:00
Kconfig.binfmt
libfs.c
locks.c
Makefile
mbcache.c
mpage.c
namei.c vfs: fix BUG_ON() in fs/namei.c:1461 2011-02-16 08:56:55 -08:00
namespace.c tidy up around finish_automount() 2011-01-17 01:47:59 -05:00
nfsctl.c
no-block.c
open.c Fix possible filp_cachep memory corruption 2011-02-11 15:53:38 -08:00
pipe.c Fix broken "pipe: use event aware wakeups" optimization 2011-01-20 16:21:59 -08:00
pnode.c
pnode.h
posix_acl.c NFS: Prevent memory allocation failure in nfsacl_encode() 2011-01-25 15:24:47 -05:00
read_write.c
read_write.h
readdir.c
select.c
seq_file.c
signalfd.c
splice.c
stack.c
stat.c
statfs.c
super.c vfs: call rcu_barrier after ->kill_sb() 2011-02-11 16:12:19 -08:00
sync.c
timerfd.c
utimes.c
xattr_acl.c
xattr.c