diff options
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r-- | arch/powerpc/platforms/52xx/mpc52xx_gpt.c | 1 | ||||
-rw-r--r-- | arch/powerpc/platforms/cell/spufs/inode.c | 18 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/eeh_sysfs.c | 1 |
3 files changed, 13 insertions, 7 deletions
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_gpt.c b/arch/powerpc/platforms/52xx/mpc52xx_gpt.c index fea833e18ad5..e0d703c7fdf7 100644 --- a/arch/powerpc/platforms/52xx/mpc52xx_gpt.c +++ b/arch/powerpc/platforms/52xx/mpc52xx_gpt.c | |||
@@ -63,6 +63,7 @@ | |||
63 | #include <linux/of_gpio.h> | 63 | #include <linux/of_gpio.h> |
64 | #include <linux/kernel.h> | 64 | #include <linux/kernel.h> |
65 | #include <linux/slab.h> | 65 | #include <linux/slab.h> |
66 | #include <linux/fs.h> | ||
66 | #include <linux/watchdog.h> | 67 | #include <linux/watchdog.h> |
67 | #include <linux/miscdevice.h> | 68 | #include <linux/miscdevice.h> |
68 | #include <linux/uaccess.h> | 69 | #include <linux/uaccess.h> |
diff --git a/arch/powerpc/platforms/cell/spufs/inode.c b/arch/powerpc/platforms/cell/spufs/inode.c index 3532b92de983..856e9c398068 100644 --- a/arch/powerpc/platforms/cell/spufs/inode.c +++ b/arch/powerpc/platforms/cell/spufs/inode.c | |||
@@ -71,12 +71,18 @@ spufs_alloc_inode(struct super_block *sb) | |||
71 | return &ei->vfs_inode; | 71 | return &ei->vfs_inode; |
72 | } | 72 | } |
73 | 73 | ||
74 | static void | 74 | static void spufs_i_callback(struct rcu_head *head) |
75 | spufs_destroy_inode(struct inode *inode) | ||
76 | { | 75 | { |
76 | struct inode *inode = container_of(head, struct inode, i_rcu); | ||
77 | INIT_LIST_HEAD(&inode->i_dentry); | ||
77 | kmem_cache_free(spufs_inode_cache, SPUFS_I(inode)); | 78 | kmem_cache_free(spufs_inode_cache, SPUFS_I(inode)); |
78 | } | 79 | } |
79 | 80 | ||
81 | static void spufs_destroy_inode(struct inode *inode) | ||
82 | { | ||
83 | call_rcu(&inode->i_rcu, spufs_i_callback); | ||
84 | } | ||
85 | |||
80 | static void | 86 | static void |
81 | spufs_init_once(void *p) | 87 | spufs_init_once(void *p) |
82 | { | 88 | { |
@@ -159,18 +165,18 @@ static void spufs_prune_dir(struct dentry *dir) | |||
159 | 165 | ||
160 | mutex_lock(&dir->d_inode->i_mutex); | 166 | mutex_lock(&dir->d_inode->i_mutex); |
161 | list_for_each_entry_safe(dentry, tmp, &dir->d_subdirs, d_u.d_child) { | 167 | list_for_each_entry_safe(dentry, tmp, &dir->d_subdirs, d_u.d_child) { |
162 | spin_lock(&dcache_lock); | ||
163 | spin_lock(&dentry->d_lock); | 168 | spin_lock(&dentry->d_lock); |
164 | if (!(d_unhashed(dentry)) && dentry->d_inode) { | 169 | if (!(d_unhashed(dentry)) && dentry->d_inode) { |
165 | dget_locked(dentry); | 170 | dget_dlock(dentry); |
166 | __d_drop(dentry); | 171 | __d_drop(dentry); |
167 | spin_unlock(&dentry->d_lock); | 172 | spin_unlock(&dentry->d_lock); |
168 | simple_unlink(dir->d_inode, dentry); | 173 | simple_unlink(dir->d_inode, dentry); |
169 | spin_unlock(&dcache_lock); | 174 | /* XXX: what was dcache_lock protecting here? Other |
175 | * filesystems (IB, configfs) release dcache_lock | ||
176 | * before unlink */ | ||
170 | dput(dentry); | 177 | dput(dentry); |
171 | } else { | 178 | } else { |
172 | spin_unlock(&dentry->d_lock); | 179 | spin_unlock(&dentry->d_lock); |
173 | spin_unlock(&dcache_lock); | ||
174 | } | 180 | } |
175 | } | 181 | } |
176 | shrink_dcache_parent(dir); | 182 | shrink_dcache_parent(dir); |
diff --git a/arch/powerpc/platforms/pseries/eeh_sysfs.c b/arch/powerpc/platforms/pseries/eeh_sysfs.c index 15e13b568904..23982c7892d2 100644 --- a/arch/powerpc/platforms/pseries/eeh_sysfs.c +++ b/arch/powerpc/platforms/pseries/eeh_sysfs.c | |||
@@ -25,7 +25,6 @@ | |||
25 | #include <linux/pci.h> | 25 | #include <linux/pci.h> |
26 | #include <asm/ppc-pci.h> | 26 | #include <asm/ppc-pci.h> |
27 | #include <asm/pci-bridge.h> | 27 | #include <asm/pci-bridge.h> |
28 | #include <linux/kobject.h> | ||
29 | 28 | ||
30 | /** | 29 | /** |
31 | * EEH_SHOW_ATTR -- create sysfs entry for eeh statistic | 30 | * EEH_SHOW_ATTR -- create sysfs entry for eeh statistic |