]> err.no Git - linux-2.6/commitdiff
mapping_set_error: add unlikely()
authorAndrew Morton <akpm@linux-foundation.org>
Thu, 24 Jul 2008 04:27:19 +0000 (21:27 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 24 Jul 2008 17:47:15 +0000 (10:47 -0700)
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>
include/linux/pagemap.h

index d2fca802f809972a9b9b05171e02fa78fa054de7..ee1ec2c7723c9505c47547b8559dbbf059bc011d 100644 (file)
@@ -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