From: Jan Kara Date: Sun, 21 Jun 2015 01:44:17 +0000 (-0400) Subject: jbd2: speedup jbd2_journal_dirty_metadata() X-Git-Tag: omap-for-v4.2/fixes-rc1^2~122^2~7 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2143c1965a761332ae417b22fd477b636e4f54ec;p=pandora-kernel.git jbd2: speedup jbd2_journal_dirty_metadata() It is often the case that we mark buffer as having dirty metadata when the buffer is already in that state (frequent for bitmaps, inode table blocks, superblock). Thus it is unnecessary to contend on grabbing journal head reference and bh_state lock. Avoid that by checking whether any modification to the buffer is needed before grabbing any locks or references. Signed-off-by: Jan Kara Signed-off-by: Theodore Ts'o --- Reading git-diff-tree failed