summaryrefslogtreecommitdiffstats
path: root/include/linux/file.h
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2010-12-13 19:38:08 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2011-01-17 03:26:26 -0500
commitc2b3e74b78b24cb367289a75a2bd30e569e56e0e (patch)
tree1ae2e53e0aa3831486afd2ec8c71a8cd32535b1b /include/linux/file.h
parent2fe17c1075836b66678ed2a305fd09b6773883aa (diff)
downloadop-kernel-dev-c2b3e74b78b24cb367289a75a2bd30e569e56e0e.zip
op-kernel-dev-c2b3e74b78b24cb367289a75a2bd30e569e56e0e.tar.gz
fs: Remove unlikely() from fput_light()
In fput_light(), there's an unlikely(fput_needed), which running on my normal desktop doing firefox, xchat, evolution and part of my distcc farm, and running the annotate branch profiler shows that the unlikely is not very unlikely. correct incorrect % Function File Line ------- --------- - -------- ---- ---- 0 48 100 fput_light file.h 26 115828710 897415279 88 fput_light file.h 26 865271179 5286128445 85 fput_light file.h 26 19568539 8923664 31 fput_light file.h 26 12353677 3562279 22 fput_light file.h 26 267691 67062 20 fput_light file.h 26 15014853 348172 2 fput_light file.h 26 209258 205 0 fput_light file.h 26 1364164 0 0 fput_light file.h 26 Which gives 1032903812 times it was correct and 6203351846 times it was incorrect, or 85% incorrect. Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include/linux/file.h')
-rw-r--r--include/linux/file.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/file.h b/include/linux/file.h
index b1e1297..e85baeb 100644
--- a/include/linux/file.h
+++ b/include/linux/file.h
@@ -23,7 +23,7 @@ extern struct file *alloc_file(struct path *, fmode_t mode,
static inline void fput_light(struct file *file, int fput_needed)
{
- if (unlikely(fput_needed))
+ if (fput_needed)
fput(file);
}
OpenPOWER on IntegriCloud