From: Gunnar Beutner Date: Sun, 17 Apr 2011 17:42:33 +0000 (+0200) Subject: Added missing initialization for va.va_dentry in zfs_get_xattrdir. X-Git-Tag: zfs-0.6.0-rc4~25 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=274b7e79f3baece5ab28331e73629f6e81fdb5ca;p=zfs Added missing initialization for va.va_dentry in zfs_get_xattrdir. Without this we may mistakenly believe we have a dentry and try to d_instantiate() it. This will result in the following BUG. It's important to note that while the xattr directory has an inode assoicated with it we never create a dentry for it. kernel BUG at fs/dcache.c:1418! Signed-off-by: Brian Behlendorf Closes #202 --- diff --git a/module/zfs/zfs_dir.c b/module/zfs/zfs_dir.c index 355b0ef0a..199e58cf7 100644 --- a/module/zfs/zfs_dir.c +++ b/module/zfs/zfs_dir.c @@ -1038,6 +1038,7 @@ top: va.va_mode = S_IFDIR | S_ISVTX | 0777; zfs_fuid_map_ids(zp, cr, &va.va_uid, &va.va_gid); + va.va_dentry = NULL; error = zfs_make_xattrdir(zp, &va, xipp, cr); zfs_dirent_unlock(dl);