Skip to content

Commit

Permalink
mapping_set_error: add unlikely()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andrew Morton authored and Linus Torvalds committed Jul 24, 2008
1 parent 9023cb7 commit 2185e69
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/linux/pagemap.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2185e69

Please sign in to comment.