[Devel] [PATCH vz7] fuse: writepages search nits
Maxim Patlasov
mpatlasov at virtuozzo.com
Fri Apr 7 10:59:14 PDT 2017
The patch removes redundant checks in rb-tree search. Thanks to
Kirill Tkhai for pointing out.
https://jira.sw.ru/browse/PSBM-59254
Signed-off-by: Maxim Patlasov <mpatlasov at virtuozzo.com>
---
fs/fuse/file.c | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index eab5030..4f62237 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -507,10 +507,6 @@ static bool fuse_range_is_writeback(struct inode *inode, pgoff_t idx_from,
spin_lock(&fc->lock);
n = fi->writepages.rb_node;
- if (!n) {
- spin_unlock(&fc->lock);
- return false;
- }
while (n) {
struct fuse_req *req;
@@ -550,11 +546,6 @@ static bool fuse_page_is_writeback(struct inode *inode, pgoff_t index)
spin_lock(&fc->lock);
n = fi->writepages.rb_node;
- if (!n) {
- spin_unlock(&fc->lock);
- return false;
- }
-
while (n) {
struct fuse_req *req;
More information about the Devel
mailing list