Skip to content

Commit

Permalink
hfs: don't allow mounting over .../rsrc
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
Al Viro committed May 22, 2018
1 parent 6b9ccee commit 0e5c56f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/hfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,7 @@ static struct dentry *hfs_file_lookup(struct inode *dir, struct dentry *dentry,
igrab(dir);
hlist_add_fake(&inode->i_hash);
mark_inode_dirty(inode);
dont_mount(dentry);
out:
return d_splice_alias(inode, dentry);
}
Expand Down

0 comments on commit 0e5c56f

Please sign in to comment.