projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9d286b0
)
orangefs: return from orangefs_devreq_read quickly if possible
author
Martin Brandenburg
<martin@omnibond.com>
Tue, 25 Apr 2017 19:38:06 +0000
(15:38 -0400)
committer
Mike Marshall
<hubcap@omnibond.com>
Wed, 26 Apr 2017 18:33:00 +0000
(14:33 -0400)
It is not necessary to take the lock and search through the request list
if the list is empty.
Signed-off-by: Martin Brandenburg <martin@omnibond.com>
Signed-off-by: Mike Marshall <hubcap@omnibond.com>
fs/orangefs/devorangefs-req.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/orangefs/devorangefs-req.c
b/fs/orangefs/devorangefs-req.c
index e1534c9bab16ce69e30eefd6614ca2872595fb04..c19f0787c9c65bddfc8b82ca7fad2f88549f2f91 100644
(file)
--- a/
fs/orangefs/devorangefs-req.c
+++ b/
fs/orangefs/devorangefs-req.c
@@
-180,6
+180,10
@@
static ssize_t orangefs_devreq_read(struct file *file,
return -EINVAL;
}
+ /* Check for an empty list before locking. */
+ if (list_empty(&orangefs_request_list))
+ return -EAGAIN;
+
restart:
/* Get next op (if any) from top of list. */
spin_lock(&orangefs_request_list_lock);