[PATCH] nfs: fix bdi_unregister() before sb kill

From: Jens Axboe
Date: Thu Sep 17 2009 - 08:42:39 EST


Hi,

This can cause a hang on NFS umount, since the bdi gets pruned before we
flush any pending dirty IO. Peter, can you check whether it fixes your
issue?

Signed-off-by: Jens Axboe <jens.axboe@xxxxxxxxxx>

diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index de93569..f1cc058 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -2190,8 +2190,8 @@ static void nfs_kill_super(struct super_block *s)
{
struct nfs_server *server = NFS_SB(s);

- bdi_unregister(&server->backing_dev_info);
kill_anon_super(s);
+ bdi_unregister(&server->backing_dev_info);
nfs_fscache_release_super_cookie(s);
nfs_free_server(server);
}

--
Jens Axboe

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