configfs: Fix potential NULL d_inode dereference
[linux-drm-fsl-dcu.git] / fs / configfs / inode.c
index 60727db7b0a361adac5f10f04072a39e482d03bc..5423a6a6ecc8350c0284d307ac47cf6afad9238a 100644 (file)
@@ -236,7 +236,7 @@ void configfs_drop_dentry(struct configfs_dirent * sd, struct dentry * parent)
 
        if (dentry) {
                spin_lock(&dentry->d_lock);
-               if (!(d_unhashed(dentry) && dentry->d_inode)) {
+               if (!d_unhashed(dentry) && dentry->d_inode) {
                        dget_dlock(dentry);
                        __d_drop(dentry);
                        spin_unlock(&dentry->d_lock);