summaryrefslogtreecommitdiff
path: root/fs/btrfs
diff options
context:
space:
mode:
authorColin Ian King <colin.i.king@gmail.com>2023-08-18 16:55:25 +0300
committerDavid Sterba <dsterba@suse.com>2023-10-12 17:44:19 +0300
commita666ce9babf2e3ade3809163ccc81d5805bb503b (patch)
treecf587b655ed9192d0fa09d8d747bab7358e7303e /fs/btrfs
parentf3623740068e548b7c6fdb42171c118189d0e03f (diff)
downloadlinux-a666ce9babf2e3ade3809163ccc81d5805bb503b.tar.xz
btrfs: remove redundant initialization of variable dirty in btrfs_update_time()
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@gmail.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r--fs/btrfs/inode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index c9317c047587..6f67ac612c6e 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -6031,7 +6031,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;