]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - fs/configfs/configfs_internal.h
fs: dcache scale d_unhashed
[mirror_ubuntu-artful-kernel.git] / fs / configfs / configfs_internal.h
index da6061a6df40ced1c03816b3210069b6f22b1067..e58b4c30e216fa2df3c6028c4cb788e09551ac5b 100644 (file)
@@ -121,6 +121,7 @@ static inline struct config_item *configfs_get_config_item(struct dentry *dentry
        struct config_item * item = NULL;
 
        spin_lock(&dcache_lock);
+       spin_lock(&dentry->d_lock);
        if (!d_unhashed(dentry)) {
                struct configfs_dirent * sd = dentry->d_fsdata;
                if (sd->s_type & CONFIGFS_ITEM_LINK) {
@@ -129,6 +130,7 @@ static inline struct config_item *configfs_get_config_item(struct dentry *dentry
                } else
                        item = config_item_get(sd->s_element);
        }
+       spin_unlock(&dentry->d_lock);
        spin_unlock(&dcache_lock);
 
        return item;