mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
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>
This commit is contained in:
parent
1a97d899ec
commit
2e2cbaf920
1 changed files with 1 additions and 1 deletions
|
@ -315,7 +315,7 @@ retry:
|
|||
if (mode & FMODE_WRITE)
|
||||
r = w = 1;
|
||||
|
||||
name = dentry_name(file->f_path.dentry);
|
||||
name = dentry_name(d_real(file->f_path.dentry, file->f_inode));
|
||||
if (name == NULL)
|
||||
return -ENOMEM;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue