diff options
author | Ishan Mittal <imittal@nvidia.com> | 2014-06-11 11:03:00 +0530 |
---|---|---|
committer | Simone Willett <swillett@nvidia.com> | 2014-06-20 10:53:39 -0700 |
commit | d3871d9d77a20ac21451a294cd1edb48f0597e4c (patch) | |
tree | b40f1829b35834b4f599fd3a28f9682d047da977 /fs | |
parent | 118596094bdcfa0935a0a40a23b6860a04614c49 (diff) |
fs : adding null pointer check in set_worker_desc
The Bug was due to the following control flow
remove disk
bdi_destroy()
bdi_unregister()
bdi->dev = NULL (bdi_writeback_workfn)
Bug 200011038
Change-Id: I3710c5b3f2106c14807bd8a5eea8a030312c8d6c
Signed-off-by: Ishan Mittal <imittal@nvidia.com>
Reviewed-on: http://git-master/r/421995
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/fs-writeback.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index 556af9eff336..1633459fcb98 100644 --- a/fs/fs-writeback.c +++ b/fs/fs-writeback.c @@ -1025,7 +1025,8 @@ void bdi_writeback_workfn(struct work_struct *work) struct backing_dev_info *bdi = wb->bdi; long pages_written; - set_worker_desc("flush-%s", dev_name(bdi->dev)); + set_worker_desc("flush-%s", bdi->dev ? + dev_name(bdi->dev) : bdi->name); current->flags |= PF_SWAPWRITE; if (likely(!current_is_workqueue_rescuer() || |