diff --git a/lustre/llite/llite_lib.c b/lustre/llite/llite_lib.c index 2cf609800bd0a64443e8af85aa778b452ee9872f..e6667dfa42a2a60c85f244c6ab937e31d2288594 100644 --- a/lustre/llite/llite_lib.c +++ b/lustre/llite/llite_lib.c @@ -2012,9 +2012,19 @@ void ll_umount_begin(struct super_block *sb) /* Really, we'd like to wait until there are no requests outstanding, * and then continue. For now, we just invalidate the requests, - * schedule, and hope. + * schedule() and sleep one second if needed, and hope. */ schedule(); +#ifdef HAVE_UMOUNTBEGIN_VFSMOUNT + if (atomic_read(&vfsmnt->mnt_count) > 2) { + cfs_schedule_timeout(CFS_TASK_INTERRUPTIBLE, + cfs_time_seconds(1)); + if (atomic_read(&vfsmnt->mnt_count) > 2) + LCONSOLE_WARN("Mount still busy with %d refs! You " + "may try to umount it a bit later\n", + atomic_read(&vfsmnt->mnt_count)); + } +#endif EXIT; }