reiserfs: destroy allocated commit workqueue
authorJiri Slaby <jslaby@suse.cz>
Fri, 12 Dec 2014 15:29:29 +0000 (16:29 +0100)
committerJan Kara <jack@suse.cz>
Fri, 12 Dec 2014 21:18:07 +0000 (22:18 +0100)
When resirefs is trying to mount a partition, it creates a commit
workqueue (sbi->commit_wq). But when mount fails later, the workqueue
is not freed.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Reported-by: auxsvr@gmail.com
Reported-by: BenoƮt Monin <benoit.monin@gmx.fr>
Cc: Jan Kara <jack@suse.cz>
Cc: stable@vger.kernel.org # >= 3.16
Cc: reiserfs-devel@vger.kernel.org
Fixes: 797d9016ceca69879bb273218810fa0beef46aac
Signed-off-by: Jan Kara <jack@suse.cz>
fs/reiserfs/super.c

index ea63ab1..71fbbe3 100644 (file)
@@ -2172,6 +2172,9 @@ error_unlocked:
                reiserfs_write_unlock(s);
        }
 
+       if (sbi->commit_wq)
+               destroy_workqueue(sbi->commit_wq);
+
        cancel_delayed_work_sync(&REISERFS_SB(s)->old_work);
 
        reiserfs_free_bitmap_cache(s);