提交 2185e69f 编写于 作者: A Andrew Morton 提交者: Linus Torvalds

mapping_set_error: add unlikely()

This is called on a per-page basis and in the vast majority of cases
`error' is zero.

Cc: Guillaume Chazarain <guichaz@gmail.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 9023cb7e
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
static inline void mapping_set_error(struct address_space *mapping, int error) static inline void mapping_set_error(struct address_space *mapping, int error)
{ {
if (error) { if (unlikely(error)) {
if (error == -ENOSPC) if (error == -ENOSPC)
set_bit(AS_ENOSPC, &mapping->flags); set_bit(AS_ENOSPC, &mapping->flags);
else else
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册