diff options
| author | Filipe David Borba Manana <[email protected]> | 2013-12-12 19:19:52 +0000 |
|---|---|---|
| committer | Chris Mason <[email protected]> | 2014-01-28 21:19:56 +0000 |
| commit | 783577663507411e36e459390ef056556e93ef29 (patch) | |
| tree | 8cf25b7ff377d398569dc59e69984124900315f9 /fs/btrfs/dev-replace.c | |
| parent | Btrfs: move the extent buffer radix tree into the fs_info (diff) | |
| download | kernel-783577663507411e36e459390ef056556e93ef29.tar.gz kernel-783577663507411e36e459390ef056556e93ef29.zip | |
Btrfs: return immediately if tree log mod is not necessary
In ctree.c:tree_mod_log_set_node_key() we were calling
__tree_mod_log_insert_key() even when the modification doesn't need
to be logged. This would allocate a tree_mod_elem structure, fill it
and pass it to __tree_mod_log_insert(), which would just acquire
the tree mod log write lock and then free the tree_mod_elem structure
and return (that is, a no-op).
Therefore call tree_mod_log_insert() instead of __tree_mod_log_insert()
which just returns immediately if the modification doesn't need to be
logged (without allocating the structure, fill it, acquire write lock,
free structure).
Signed-off-by: Filipe David Borba Manana <[email protected]>
Signed-off-by: Josef Bacik <[email protected]>
Signed-off-by: Chris Mason <[email protected]>
Diffstat (limited to 'fs/btrfs/dev-replace.c')
0 files changed, 0 insertions, 0 deletions
