author: Nick Piggin <npiggin@kernel.dk> 2011-01-07 17:49:33 +1100
committer: Nick Piggin <npiggin@kernel.dk> 2011-01-07 17:50:21 +1100
commit: da5029563a0a026c64821b09e8e7b4fd81d3fe1b
parent: b7ab39f631f505edc2bbdb86620d5493f995c9da
Commit Summary:
Diffstat:
1 file changed, 2 insertions, 0 deletions
diff --git a/fs/configfs/configfs_internal.h b/fs/configfs/configfs_internal.h
index da6061a6df40..e58b4c30e216 100644
--- a/fs/configfs/configfs_internal.h
+++ b/fs/configfs/configfs_internal.h
@@ -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;