[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20190412105733.25976-1-colin.king@canonical.com>
Date: Fri, 12 Apr 2019 11:57:33 +0100
From: Colin King <colin.king@...onical.com>
To: Mike Marshall <hubcap@...ibond.com>,
Martin Brandenburg <martin@...ibond.com>,
devel@...ts.orangefs.org
Cc: kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH][next] orangefs: remove redundant code
From: Colin Ian King <colin.king@...onical.com>
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@...onical.com>
---
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
Powered by blists - more mailing lists