[PATCH][next] btrfs: remove redundant initialization of variable dirty

From: Colin Ian King
Date: Fri Aug 18 2023 - 09:56:38 EST


The variable dirty is initialized with a value that is never read, it
is being re-assigned later on. Remove the redundant initialization.
Cleans up clang scan build warning:

fs/btrfs/inode.c:5965:7: warning: Value stored to 'dirty' during its
initialization is never read [deadcode.DeadStores]

Signed-off-by: Colin Ian King <colin.i.king@xxxxxxxxx>
---
fs/btrfs/inode.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 7d11dbd74956..6441c0053355 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -5962,7 +5962,7 @@ static int btrfs_dirty_inode(struct btrfs_inode *inode)
static int btrfs_update_time(struct inode *inode, int flags)
{
struct btrfs_root *root = BTRFS_I(inode)->root;
- bool dirty = flags & ~S_VERSION;
+ bool dirty;

if (btrfs_root_readonly(root))
return -EROFS;
--
2.39.2