[05/10] hfs: don't allow mounting over .../rsrc
diff mbox

Message ID 20180525235426.9750-5-viro@ZenIV.linux.org.uk
State New
Headers show

Commit Message

Al Viro May 25, 2018, 11:54 p.m. UTC
From: Al Viro <viro@zeniv.linux.org.uk>

That's one case when unlink() destroys a subtree, thanks to "resource
fork" idiocy.  We might forcibly evict that shit on unlink(2), but
for now let's just disallow overmounting; as it is, anything that
plays games with those would leak mounts.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
 fs/hfs/inode.c | 1 +
 1 file changed, 1 insertion(+)

diff mbox

diff --git a/fs/hfs/inode.c b/fs/hfs/inode.c
index 0612fa367bd1..b3309b83371a 100644
--- a/fs/hfs/inode.c
+++ b/fs/hfs/inode.c
@@ -543,6 +543,7 @@  static struct dentry *hfs_file_lookup(struct inode *dir, struct dentry *dentry,
+	dont_mount(dentry);
 	return d_splice_alias(inode, dentry);