]> git.proxmox.com Git - mirror_zfs.git/commitdiff
Added missing initialization for va.va_dentry in zfs_get_xattrdir.
authorGunnar Beutner <gunnar@beutner.name>
Sun, 17 Apr 2011 17:42:33 +0000 (19:42 +0200)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 19 Apr 2011 20:57:41 +0000 (13:57 -0700)
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 <behlendorf1@llnl.gov>
Closes #202

module/zfs/zfs_dir.c

index 355b0ef0abc032e82f2889c8806eff1ae31b756b..199e58cf7f28396684d41d846bd841136df1c758 100644 (file)
@@ -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);