From: Pavel Tikhomirov <ptikhomi...@virtuozzo.com>

The datawriteback variable was defined but never used after its assignment.
Remove both declaration and assignment to clean up the code.

Part of rework for ext4_sync_files function.

Fixes: 26337aacaafa9 ("ext4: add mfsync support")
https://virtuozzo.atlassian.net/browse/VSTOR-107255
Signed-off-by: Pavel Tikhomirov <ptikhomi...@virtuozzo.com>

Feature: ext4: optimized sync of a set of files - mfsync()
---
 fs/ext4/fsync.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fs/ext4/fsync.c b/fs/ext4/fsync.c
index 9819848c17a34..0a210181f20ab 100644
--- a/fs/ext4/fsync.c
+++ b/fs/ext4/fsync.c
@@ -181,7 +181,7 @@ int ext4_sync_files(struct file **files, unsigned int 
*flags, unsigned int nr_fi
        struct super_block *sb;
        journal_t *journal;
        int err = 0, err2 = 0, i = 0, j = 0;
-       int force_commit = 0, datawriteback = 0;
+       int force_commit = 0;
        tid_t commit_tid = 0;
        int need_barrier = 0;
        int ret;
@@ -239,7 +239,6 @@ int ext4_sync_files(struct file **files, unsigned int 
*flags, unsigned int nr_fi
 
                inode_lock_shared(inode);
                force_commit  |= ext4_should_journal_data(inode);
-               datawriteback |= ext4_should_writeback_data(inode);
                tid = datasync ? ei->i_datasync_tid : ei->i_sync_tid;
                inode_unlock_shared(inode);
                trace_ext4_sync_files_iterate(files[j]->f_path.dentry, tid, 
datasync);
-- 
2.43.0

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to