diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2018-04-30 19:52:18 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2018-05-22 14:28:00 -0400 |
commit | 0e5c56fd07432c426b7ab1a84e8d97a00d7e08ca (patch) | |
tree | 8b0e0eba7e155ea5a311e1ec12b67a9e571f107d | |
parent | 6b9cceead0d1fc478fbc25a7d8d8f006d061a1a2 (diff) |
hfs: don't allow mounting over .../rsrc
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>
-rw-r--r-- | fs/hfs/inode.c | 1 |
1 files changed, 1 insertions, 0 deletions
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, | |||
543 | igrab(dir); | 543 | igrab(dir); |
544 | hlist_add_fake(&inode->i_hash); | 544 | hlist_add_fake(&inode->i_hash); |
545 | mark_inode_dirty(inode); | 545 | mark_inode_dirty(inode); |
546 | dont_mount(dentry); | ||
546 | out: | 547 | out: |
547 | return d_splice_alias(inode, dentry); | 548 | return d_splice_alias(inode, dentry); |
548 | } | 549 | } |