Thread (59 messages) 59 messages, 2 authors, 2011-03-04

Re: [PATCHv2 13/24] sys_swapon: separate bdev claim and inode lock

From: Cesar Eduardo Barros <hidden>
Date: 2011-03-02 23:02:50

Em 02-03-2011 18:40, Eric B Munson escreveu:
quoted
-	} else {
-		error = -EINVAL;
+	error = claim_swapfile(p, inode);
+	if (unlikely(error))
As a personal preference, I don't use likely/unlikley unless I have a profiler
telling me that the compiler got it wrong.  Just a suggestion.
I tend to use them for paths which should never happen in normal 
operation (error paths mostly). But yeah, I am probably still overusing 
them - who says the error path is not normal in some cases? Old habits 
die hard...

And I added more unlikely() calls than are visible in the patches. 
Remember that every IS_ERR() counts as a unlikely() too.

-- 
Cesar Eduardo Barros
cesarb@cesarb.net
cesar.barros@gmail.com

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help