]> git.baikalelectronics.ru Git - kernel.git/commit
fix hostfs_open() use of ->f_path.dentry
authorAl Viro <viro@zeniv.linux.org.uk>
Wed, 9 Dec 2020 23:38:24 +0000 (18:38 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Tue, 22 Dec 2020 02:42:29 +0000 (21:42 -0500)
commit3d0ad246569744e25981267557ba86cf811e1479
tree57d2cf2250889401bdd946a392b361fdb9290aba
parent7e0088f4e90e7ed5fa731b6e046218d404e398d8
fix hostfs_open() use of ->f_path.dentry

this is one of the cases where we need to use d_real() - we are
using more than the name of dentry here.  ->d_sb is used as well,
so in case of hostfs being used as a layer we get the wrong
superblock.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Tested-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/hostfs/hostfs_kern.c