On 20/02/2019 16:11, Nikolay Borisov wrote:
> We always pass an inode alongside async_cow. fs_info can be referenced
> from this inode so it makes the explicit fs_info member in
> struct async_cow redundant, remove it. No functional changes.
[...]
> @@ -1151,13 +1150,10 @@ static noinline void async_cow_start(struct btrfs_work *work)
> */
> static noinline void async_cow_submit(struct btrfs_work *work)
> {
> - struct btrfs_fs_info *fs_info;
> - struct async_cow *async_cow;
> + struct async_cow *async_cow = container_of(work, struct async_cow, work);
> + struct btrfs_fs_info *fs_info = btrfs_work_owner(work);
> unsigned long nr_pages;
Nit, in your changelog you write that fs_info can be retrieved from the
inode that is passed with 'struct async_cow' but you're getting fs_info
from the btrfs_work structure.
--
Johannes Thumshirn SUSE Labs Filesystems
jthumshirn@xxxxxxx +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850