]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: Open-code add_delayed_data_ref
authorNikolay Borisov <nborisov@suse.com>
Tue, 24 Apr 2018 14:18:21 +0000 (17:18 +0300)
committerDavid Sterba <dsterba@suse.com>
Mon, 28 May 2018 16:07:31 +0000 (18:07 +0200)
commit43492985ed9cc62dad37f200f153d78536da5797
treed6d83d5db46512a305142ca5fb401555886dbe9e
parent827a7cf226f58088b6d6ea968c50dba620d1ce9c
btrfs: Open-code add_delayed_data_ref

Now that the initialization part and the critical section code have been
split it's a lot easier to open code add_delayed_data_ref. Do so in the
following manner:

1. The common init function is put immediately after memory-to-be-initialized
   is allocated, followed by the specific data ref initialization.

2. The only piece of code that remains in the critical section is
   insert_delayed_ref call.

3. Tracing and memory freeing code is moved outside of the critical
   section.

No functional changes, just an overall shorter critical section.

Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/delayed-ref.c