From 67a2fac36de01f9c3db5d0f9593ed255dc3e251e Mon Sep 17 00:00:00 2001 From: Jeff Mahoney Date: Wed, 21 Dec 2011 21:18:43 +0100 Subject: [PATCH] --- yaml --- r: 281455 b: refs/heads/master c: a9e36da655e54545c3289b2a0700b5c443de0edd h: refs/heads/master i: 281453: 6ecb6b55e241e0ea0056810ad0091cfa1ba6836c 281451: f57523a4e241431742c0391476a10a4fc83b1f6f 281447: 2770359be26653019957095a3b788ef786a93e76 281439: c62e999d34166ec21e12c4df9db7275d510dd2e8 v: v3 --- [refs] | 2 +- trunk/fs/reiserfs/super.c | 24 ++++++++++++++---------- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/[refs] b/[refs] index 6ee36492ee5d..ae4df8590f94 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a06d789b424190e9f59da391681f908486db2554 +refs/heads/master: a9e36da655e54545c3289b2a0700b5c443de0edd diff --git a/trunk/fs/reiserfs/super.c b/trunk/fs/reiserfs/super.c index f9eaa4a4f5f3..5e3527be1146 100644 --- a/trunk/fs/reiserfs/super.c +++ b/trunk/fs/reiserfs/super.c @@ -453,16 +453,20 @@ int remove_save_link(struct inode *inode, int truncate) static void reiserfs_kill_sb(struct super_block *s) { if (REISERFS_SB(s)) { - if (REISERFS_SB(s)->xattr_root) { - d_invalidate(REISERFS_SB(s)->xattr_root); - dput(REISERFS_SB(s)->xattr_root); - REISERFS_SB(s)->xattr_root = NULL; - } - if (REISERFS_SB(s)->priv_root) { - d_invalidate(REISERFS_SB(s)->priv_root); - dput(REISERFS_SB(s)->priv_root); - REISERFS_SB(s)->priv_root = NULL; - } + /* + * Force any pending inode evictions to occur now. Any + * inodes to be removed that have extended attributes + * associated with them need to clean them up before + * we can release the extended attribute root dentries. + * shrink_dcache_for_umount will BUG if we don't release + * those before it's called so ->put_super is too late. + */ + shrink_dcache_sb(s); + + dput(REISERFS_SB(s)->xattr_root); + REISERFS_SB(s)->xattr_root = NULL; + dput(REISERFS_SB(s)->priv_root); + REISERFS_SB(s)->priv_root = NULL; } kill_block_super(s);