Re: Can't unmount volume which was once exported via NFS

Neil Brown (neilb@cse.unsw.edu.au)
Tue, 24 Jun 2003 13:00:48 +1000


On June 20, felipe_alfaro@linuxmail.org wrote:
> Hi!
>
> Starting with 2.5.72-bk, I've been hit again by the old "umount:
> /volume: device is busy" bug when trying to unmount an ext3 volume which
> once was being exported via NFS.
>
> To reproduce the problem, I compiled 2.5.72-bk3 with the configuration
> file attached an plugged it on a RHL9 box. To reproduce the bug, I
> exported my "/data" volume:

Thanks for the report.
It took me a while to find because I am using a newer nfs-utils which
exports and unexports things differently, and there are lots of extra
bugs that were affecting it :-(

However the one that was affecting you can be fixed by:

diff ./net/sunrpc/cache.c~current~ ./net/sunrpc/cache.c
--- ./net/sunrpc/cache.c~current~ 2003-06-24 12:37:38.000000000 +1000
+++ ./net/sunrpc/cache.c 2003-06-24 12:46:24.000000000 +1000
@@ -319,8 +319,8 @@ int cache_clean(void)
if (test_and_clear_bit(CACHE_PENDING, &ch->flags))
queue_loose(current_detail, ch);

- if (atomic_read(&ch->refcnt))
- continue;
+ if (!atomic_read(&ch->refcnt))
+ break;
}
if (ch) {
cache_get(ch);

I'll make sure it and a bunch of other fixes get to Linus shortly.

NeilBrown
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/