Explorar o código

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: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Andrew Morton %!s(int64=17) %!d(string=hai) anos
pai
achega
2185e69f68
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      include/linux/pagemap.h

+ 1 - 1
include/linux/pagemap.h

@@ -22,7 +22,7 @@
 
 static inline void mapping_set_error(struct address_space *mapping, int error)
 {
-	if (error) {
+	if (unlikely(error)) {
 		if (error == -ENOSPC)
 			set_bit(AS_ENOSPC, &mapping->flags);
 		else