diff options
author | Filipe Manana <fdmanana@suse.com> | 2021-07-20 16:03:42 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2021-08-23 13:19:01 +0200 |
commit | e68107e51f8466e1fae40d64b873d0a11398a628 (patch) | |
tree | bd859350ea3537b009eda9eff9cef3624691be04 /fs/btrfs/tree-log.c | |
parent | e1a6d2648300ef4cfdcfd4838224fe5cefe3caaa (diff) | |
download | linux-e68107e51f8466e1fae40d64b873d0a11398a628.tar.gz linux-e68107e51f8466e1fae40d64b873d0a11398a628.tar.bz2 linux-e68107e51f8466e1fae40d64b873d0a11398a628.zip |
btrfs: remove unnecessary list head initialization when syncing log
One of the last steps of syncing the log is to remove all log contexts
from the root's list of contexts, done at btrfs_remove_all_log_ctxs().
There we iterate over all the contexts in the list and delete each one
from the list, and after that we call INIT_LIST_HEAD() on the list. That
is unnecessary since at that point the list is empty.
So just remove the INIT_LIST_HEAD() call. It's not needed, increases code
size (bloat-o-meter reported a delta of -122 for btrfs_sync_log() after
this change) and increases two critical sections delimited by log mutexes.
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/tree-log.c')
-rw-r--r-- | fs/btrfs/tree-log.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index a7ce23b9d2ee..3e6c8f8a2909 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree-log.c @@ -3039,8 +3039,6 @@ static inline void btrfs_remove_all_log_ctxs(struct btrfs_root *root, list_del_init(&ctx->list); ctx->log_ret = error; } - - INIT_LIST_HEAD(&root->log_ctxs[index]); } /* |