aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>2014-02-21 22:45:10 +0900
committerDaniel Phillips <daniel@tux3.org>2014-02-21 22:45:10 +0900
commitb2b30e83b4942c26b502f3dfab12c78eb428a1fd (patch)
tree4dad0995712dcb8fa5d0c0d65ab7b2ddd0ad9654
parent0729d895b226f85568a5b086dd57599dfcdcc3f3 (diff)
downloadlinux-tux3-b2b30e83b4942c26b502f3dfab12c78eb428a1fd.tar.gz
tux3: Fix calling bdi_destory() more than one in tux3_exit_flusher()
__tux3_put_super() can be called more than one time if error happened in tux3_fill_super(). So, tux3_exit_flusher() have to be safe for calling multiple times. But, current tux3_exit_flusher() is not safe. To fix it, this checks whether vfs_sb(sb)->s_bdi is having &sb->bdi (bdi_destory() sets s_bdi to default_backing_dev_info). Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
-rw-r--r--fs/tux3/commit_flusher_hack.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/tux3/commit_flusher_hack.c b/fs/tux3/commit_flusher_hack.c
index a27918e4ee366b..6e7d05a3d10416 100644
--- a/fs/tux3/commit_flusher_hack.c
+++ b/fs/tux3/commit_flusher_hack.c
@@ -579,7 +579,8 @@ int tux3_init_flusher(struct sb *sb)
void tux3_exit_flusher(struct sb *sb)
{
struct backing_dev_info *bdi = vfs_sb(sb)->s_bdi;
- tux3_destroy_writeback(bdi);
+ if (bdi == &sb->bdi)
+ tux3_destroy_writeback(bdi);
}
static void schedule_flush_delta(struct sb *sb)