summary refs log tree commit diff
path: root/virt
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2010-07-25 14:29:25 +0300
committerJens Axboe <jaxboe@fusionio.com>2010-08-07 18:53:57 +0200
commitc284de61db31669cce547ffc99efda971146719d (patch)
treed4b05dd00d1e33dd34917f3d2a9476f69ca9ac99 /virt
parent603320239fb436f175c8b6bfa43d5023c47a6dc2 (diff)
downloadlinux-c284de61db31669cce547ffc99efda971146719d.tar.gz
writeback: cleanup bdi_register
This patch makes sure we first initialize everything and set the BDI_registered
flag, and only after this we add the bdi to 'bdi_list'. Current code adds the
bdi to the list too early, and as a result I the

WARN(!test_bit(BDI_registered, &bdi->state)

in bdi forker is triggered. Also, it is in general good practice to make things
visible only when they are fully initialized.

Also, this patch does few micro clean-ups:
1. Removes the 'exit' label which does not do anything, just returns. This
   allows to get rid of few braces and 'ret' variable and make the code smaller.
2. If 'kthread_run()' fails, remove the error code it returns, not hard-coded
   '-ENOMEM'. Theoretically, some day 'kthread_run()' can return something
   else. Also, in case of failure it is not necessary to set 'bdi->wb.task' to
   NULL.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'virt')
0 files changed, 0 insertions, 0 deletions