[PATCH][next] orangefs: remove redundant code

From: Colin King
Date: Fri Apr 12 2019 - 06:57:38 EST


From: Colin Ian King <colin.king@xxxxxxxxxxxxx>

The check of inode->i_state & I_DIRTY_PAGES is redundant as it
just does the same actions as the following code when the condition
is false. Although it shows the intention of what to do when
I_DIRTY_PAGES is set I think removing the redunant check is preferable.

Addresses-Coverity: ("Identical code for different branches")
Signed-off-by: Colin Ian King <colin.king@xxxxxxxxxxxxx>
---
fs/orangefs/orangefs-utils.c | 4 ----
1 file changed, 4 deletions(-)

diff --git a/fs/orangefs/orangefs-utils.c b/fs/orangefs/orangefs-utils.c
index 523e7f9fc2e9..d4b7ae763186 100644
--- a/fs/orangefs/orangefs-utils.c
+++ b/fs/orangefs/orangefs-utils.c
@@ -253,10 +253,6 @@ int orangefs_inode_getattr(struct inode *inode, int flags)
write_inode_now(inode, 1);
goto again;
}
- if (inode->i_state & I_DIRTY_PAGES) {
- spin_unlock(&inode->i_lock);
- return 0;
- }
spin_unlock(&inode->i_lock);
return 0;
}
--
2.20.1