ext4: Remove useless spinlock in ext4_getattr()

Linus noted, and complained to me, that doing while lots of "git diff"'s
of kernel sources, these spinlocks were responsible for 27% of the
spinlock cost on his two-processor system as reported by perf.

Git was doing lots of parallel stats, and this was putting a lot of
pressure on ext4_getattr(). A spinlock to protect a single
memory-to-memory copy is pointless, so remove it.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Theodore Ts'o and committed by
Linus Torvalds
eb8abb92 7fe19da4

-2
-2
fs/ext4/inode.c
··· 5410 * will return the blocks that include the delayed allocation 5411 * blocks for this file. 5412 */ 5413 - spin_lock(&EXT4_I(inode)->i_block_reservation_lock); 5414 delalloc_blocks = EXT4_I(inode)->i_reserved_data_blocks; 5415 - spin_unlock(&EXT4_I(inode)->i_block_reservation_lock); 5416 5417 stat->blocks += (delalloc_blocks << inode->i_sb->s_blocksize_bits)>>9; 5418 return 0;
··· 5410 * will return the blocks that include the delayed allocation 5411 * blocks for this file. 5412 */ 5413 delalloc_blocks = EXT4_I(inode)->i_reserved_data_blocks; 5414 5415 stat->blocks += (delalloc_blocks << inode->i_sb->s_blocksize_bits)>>9; 5416 return 0;