diff options
author | Nikolay Borisov <nborisov@suse.com> | 2019-01-03 11:50:03 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2019-02-25 16:13:20 +0300 |
commit | 4546d178745d5d5f78352a275cf50caa47528436 (patch) | |
tree | fe69937cc2ee2dd8144d684306e85703b8aa6023 | |
parent | a1d64ba60926d095d77f747a0c50159d9e2a4d98 (diff) | |
download | linux-4546d178745d5d5f78352a275cf50caa47528436.tar.xz |
btrfs: Document logic regarding inode in async_cow_submit
Add a comment explaining when ->inode could be NULL and why we always
perform the ->async_delalloc_pages modification.
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
-rw-r--r-- | fs/btrfs/inode.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index cb996903c739..05c50a02d4ff 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -1165,6 +1165,12 @@ static noinline void async_cow_submit(struct btrfs_work *work) 5 * SZ_1M) cond_wake_up_nomb(&fs_info->async_submit_wait); + /* + * ->inode could be NULL if async_cow_start has failed to compress, + * in which case we don't have anything to submit, yet we need to + * always adjust ->async_delalloc_pages as its paired with the init + * happening in cow_file_range_async + */ if (async_cow->inode) submit_compressed_extents(async_cow); } |