diff options
Diffstat (limited to 'fs/open.c')
| -rw-r--r-- | fs/open.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/fs/open.c b/fs/open.c index 157b9940dd73..6a24f988d253 100644 --- a/fs/open.c +++ b/fs/open.c @@ -840,12 +840,16 @@ EXPORT_SYMBOL(file_path); int vfs_open(const struct path *path, struct file *file, const struct cred *cred) { - struct inode *inode = vfs_select_inode(path->dentry, file->f_flags); - - if (IS_ERR(inode)) - return PTR_ERR(inode); + struct dentry *dentry = path->dentry; + struct inode *inode = dentry->d_inode; file->f_path = *path; + if (dentry->d_flags & DCACHE_OP_SELECT_INODE) { + inode = dentry->d_op->d_select_inode(dentry, file->f_flags); + if (IS_ERR(inode)) + return PTR_ERR(inode); + } + return do_dentry_open(file, inode, NULL, cred); } |
