summaryrefslogtreecommitdiffstats
path: root/fs/dcache.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2011-11-23 21:47:41 +0100
committerArnd Bergmann <arnd@arndb.de>2011-11-23 21:47:41 +0100
commit58a273745fbb2fbd01d26e7a60f0acc8c1d99469 (patch)
treebc16200f3b6ea150b298422754e32959eaa339bc /fs/dcache.c
parentdriver: pcmcia: replace IRQ_GPIO() with gpio_to_irq() (diff)
parentmacb: allow GEM to have configurable receive buffer size (diff)
downloadlinux-58a273745fbb2fbd01d26e7a60f0acc8c1d99469.tar.xz
linux-58a273745fbb2fbd01d26e7a60f0acc8c1d99469.zip
Merge branches 'drivers/macb-gem' and 'drivers/pxa-gpio' into next/drivers
Diffstat (limited to 'fs/dcache.c')
-rw-r--r--fs/dcache.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/dcache.c b/fs/dcache.c
index 274f13e2f094..a901c6901bce 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -546,9 +546,11 @@ int d_invalidate(struct dentry * dentry)
* would make it unreachable from the root,
* we might still populate it if it was a
* working directory or similar).
+ * We also need to leave mountpoints alone,
+ * directory or not.
*/
- if (dentry->d_count > 1) {
- if (dentry->d_inode && S_ISDIR(dentry->d_inode->i_mode)) {
+ if (dentry->d_count > 1 && dentry->d_inode) {
+ if (S_ISDIR(dentry->d_inode->i_mode) || d_mountpoint(dentry)) {
spin_unlock(&dentry->d_lock);
return -EBUSY;
}