Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

vfs: d_invalidate() should leave mountpoints alone

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Al Viro and committed by
Linus Torvalds
50e69630 a8445060

+4 -2
+4 -2
fs/dcache.c
··· 546 546 * would make it unreachable from the root, 547 547 * we might still populate it if it was a 548 548 * working directory or similar). 549 + * We also need to leave mountpoints alone, 550 + * directory or not. 549 551 */ 550 - if (dentry->d_count > 1) { 551 - if (dentry->d_inode && S_ISDIR(dentry->d_inode->i_mode)) { 552 + if (dentry->d_count > 1 && dentry->d_inode) { 553 + if (S_ISDIR(dentry->d_inode->i_mode) || d_mountpoint(dentry)) { 552 554 spin_unlock(&dentry->d_lock); 553 555 return -EBUSY; 554 556 }