Re: Fwd: Fw: [2.6.20.4] BUG: dentry xattrs still in use in shrink_dcache_for_umount() with reiserfs

From: Vladimir V. Saveliev
Date: Wed Apr 18 2007 - 10:18:11 EST


Hello

On Wednesday 18 April 2007 12:52, ReiserFS Developers Mailing List wrote:
> *Forwarded Conversation*
> Subject: *[2.6.20.4] BUG: dentry xattrs still in use in
> shrink_dcache_for_umount() with reiserfs*
> ------------------------
>
> * From: Andrea Righi* <righiandr@xxxxxxxxxxxxxxxxxxxxx> Reply-To:
> righiandr@xxxxxxxxxxxxxxxxxxxxx
> To: reiserfs-dev@xxxxxxxxxxx
> Cc: LKML <linux-kernel@xxxxxxxxxxxxxxx>, Andrew Morton <
> akpm@xxxxxxxxxxxxxxxxxxxx>
> Date: Fri, Apr 13, 2007 at 3:04 PM
> Attachments: config.gz
>
> I can reproduce the problem umounting my /var (reiserfs), but it doesn't
> occur with /usr or /opt, that are reiserfs too.
>
> It seems very similar to this issue:
> ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.18-rc3/2.6.18-rc3-mm2/hot-fixes/reiserfs-make-sure-all-dentries-refs-are-released-before-calling-kill_block_super-try-2.patch
>
> How the xattrs->d_count can be 1 if the dentry is explicitly released
> in reiserfs_kill_sb(), before calling kill_super_block()?
>

Jeff, in 2.6.20/fs/reiserfs/xattr.c we have get_xa_root,
which may increment xattr_root reference count either by 1 or 2:

If REISERFS_SB()->xattr_root != NULL - dentry reference count is incremented by 1 with dget.

If REISERFS_SB()->xattr_root == NULL, __get_xa_root is called which may increase xattr_root dentry reference count by 2:
once in lookup_one_len->__lookup_hash->cached_lookup->__d_lookup and once explicitly with dget in __get_xa_root.

Do you think that could be a reason of the extra reference count on xattr_root dentry?


> (config attached)
>
> -Andrea
>
> BUG: Dentry dfcd2570{i=21bc,n=xattrs} still in use (1) [unmount of reiserfs
> dm-4]
-
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/