We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a844506 commit 50e6963Copy full SHA for 50e6963
fs/dcache.c
@@ -546,9 +546,11 @@ int d_invalidate(struct dentry * dentry)
546
* would make it unreachable from the root,
547
* we might still populate it if it was a
548
* working directory or similar).
549
+ * We also need to leave mountpoints alone,
550
+ * directory or not.
551
*/
- if (dentry->d_count > 1) {
- 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)) {
554
spin_unlock(&dentry->d_lock);
555
return -EBUSY;
556
}
0 commit comments