[RFC] dget_parent() misuse in xfs_filestream_get_parent()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



	dget_parent() never returns NULL.  So this

        parent = dget_parent(dentry);
        if (!parent)
                goto out_dput;

        dir = igrab(d_inode(parent));
        dput(parent);

out_dput:

is obviously fishy.  What is that code trying to do?  Is that
"dentry might be a root of disconnected tree, in which case
we want xfs_filestream_get_parent() to return NULL"?  If so,
that should be

        parent = dget_parent(dentry);
        if (parent != dentry)
		dir = igrab(d_inode(parent));
        dput(parent);

If we want dentry itself, that dir = igrab(...) should be
unconditional.  I'm not familiar enough with that code,
and I'd rather not go into YAMassiveSideRTFS, so...



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux