From 994ef0e7cab95e2fc6f47fc8838490112e432ffd Mon Sep 17 00:00:00 2001 From: Simon Wilkinson Date: Sat, 19 Dec 2009 14:48:32 +0000 Subject: [PATCH] Linux: Flush vcaches when a mount fails GetVCache (well, really NewVCache) creates a new vcache, with an attached inode, and links it into the VLRU queue, regardless of whether it is successful in populating that vcache or not. The attached inode, on Linux, contains a reference to the super block of the filesystem. If the created vcache is for the root, however, and populating that vcache failes, then mount fails, and the super block is disposed of. This leaves us with a vcache in the VLRU queue which contains a reference to a non-existent inode. When ShakeLooseVCaches comes along a few minutes later, it attempts to discard this inode. However, doing so fails because the inode no longer has a valid super block. Avoid this trauma by ensuring all vcaches are disposed of before the super block goes away, in the event of a mount failure. Change-Id: I68864f1ea401d24adba76164905a17de6ab3e6ce Reviewed-on: http://gerrit.openafs.org/1003 Reviewed-by: Marc Dionne Tested-by: Marc Dionne Reviewed-by: Derrick Brashear --- src/afs/LINUX/osi_vfsops.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/afs/LINUX/osi_vfsops.c b/src/afs/LINUX/osi_vfsops.c index ea7bc52..0b5b133 100644 --- a/src/afs/LINUX/osi_vfsops.c +++ b/src/afs/LINUX/osi_vfsops.c @@ -134,6 +134,7 @@ afs_fill_super(struct super_block *sb, void *data, int silent) code = afs_root(sb); if (code) { afs_globalVFS = NULL; + osi_linux_free_inode_pages(); module_put(THIS_MODULE); } -- 1.9.4