History

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.

Al Viro committed 5 years ago

Commit 2e2cbaf1 parent 1a97d891 file · +1 −1Browse files

Unified · Split

fs/hostfs/hostfs_kern.c+1−1
@@ -315,7 +315,7 @@ retry: · 314 unmodified lines
315315 if (mode & FMODE_WRITE)
316316 r = w = 1;
317317
318− name = dentry_name(file->f_path.dentry);
318+ name = dentry_name(d_real(file->f_path.dentry, file->f_inode));
319319 if (name == NULL)
320320 return -ENOMEM;
321321

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t