From 0863a494584e960d78ab816d98fe4c00e3ae24e8 Mon Sep 17 00:00:00 2001 From: nathan Date: Sat, 9 Apr 2005 16:52:18 +0000 Subject: [PATCH] Branch b1_4 b=4834 r=adilger llog_finish before mntput --- lustre/mds/handler.c | 14 +++++++------- lustre/obdfilter/filter.c | 3 ++- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/lustre/mds/handler.c b/lustre/mds/handler.c index 06832c2..42367a2 100644 --- a/lustre/mds/handler.c +++ b/lustre/mds/handler.c @@ -1971,6 +1971,12 @@ static int mds_cleanup(struct obd_device *obd) } mds_fs_cleanup(obd); + /* 2 seems normal on mds, (may_umount() also expects 2 + fwiw), but we only see 1 at this point in obdfilter. */ + if (atomic_read(&obd->u.mds.mds_vfsmnt->mnt_count) > 2) + CERROR("%s: mount busy, mnt_count %d != 2\n", obd->obd_name, + atomic_read(&obd->u.mds.mds_vfsmnt->mnt_count)); + /* We can only unlock kernel if we are in the context of sys_ioctl, otherwise we never called lock_kernel */ if (kernel_locked()) { @@ -1978,11 +1984,7 @@ static int mds_cleanup(struct obd_device *obd) must_relock++; } - /* 2 seems normal on mds, (may_umount() also expects 2 - fwiw), but we only see 1 at this point in obdfilter. */ - if (atomic_read(&obd->u.mds.mds_vfsmnt->mnt_count) > 2) - CERROR("%s: mount busy, mnt_count %d != 2\n", obd->obd_name, - atomic_read(&obd->u.mds.mds_vfsmnt->mnt_count)); + obd_llog_finish(obd, 0); mntput(mds->mds_vfsmnt); mds->mds_sb = NULL; @@ -1996,8 +1998,6 @@ static int mds_cleanup(struct obd_device *obd) } spin_unlock_bh(&obd->obd_processing_task_lock); - obd_llog_finish(obd, 0); - ll_clear_rdonly(save_dev); if (must_relock) diff --git a/lustre/obdfilter/filter.c b/lustre/obdfilter/filter.c index 9ede6b2..4dcf70e 100644 --- a/lustre/obdfilter/filter.c +++ b/lustre/obdfilter/filter.c @@ -1406,12 +1406,13 @@ static int filter_cleanup(struct obd_device *obd) unlock_kernel(); must_relock++; } + + obd_llog_finish(obd, 0); mntput(filter->fo_vfsmnt); //destroy_buffers(filter->fo_sb->s_dev); filter->fo_sb = NULL; - obd_llog_finish(obd, 0); ll_clear_rdonly(save_dev); -- 1.8.3.1