Commit 90432e60 authored by Mikulas Patocka's avatar Mikulas Patocka Committed by Al Viro
Browse files

buffer: a small optimization in grow_buffers



This patch replaces a loop with a "tzcnt" instruction.

Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 2be7828c
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -1020,11 +1020,7 @@ grow_buffers(struct block_device *bdev, sector_t block, int size, gfp_t gfp)
	pgoff_t index;
	int sizebits;

	sizebits = -1;
	do {
		sizebits++;
	} while ((size << sizebits) < PAGE_SIZE);

	sizebits = PAGE_SHIFT - __ffs(size);
	index = block >> sizebits;

	/*