projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ext4: fix xattr shifting when expanding inodes part 2
[firefly-linux-kernel-4.4.55.git]
/
fs
/
open.c
diff --git
a/fs/open.c
b/fs/open.c
index 6a24f988d253dcf883e6fff1b851d33ebcd6ab50..157b9940dd733b50b0ffe528e2e8c94fe4796ec3 100644
(file)
--- a/
fs/open.c
+++ b/
fs/open.c
@@
-840,16
+840,12
@@
EXPORT_SYMBOL(file_path);
int vfs_open(const struct path *path, struct file *file,
const struct cred *cred)
{
int vfs_open(const struct path *path, struct file *file,
const struct cred *cred)
{
- struct dentry *dentry = path->dentry;
- struct inode *inode = dentry->d_inode;
+ struct inode *inode = vfs_select_inode(path->dentry, file->f_flags);
- 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);
- }
+ if (IS_ERR(inode))
+ return PTR_ERR(inode);
+ file->f_path = *path;
return do_dentry_open(file, inode, NULL, cred);
}
return do_dentry_open(file, inode, NULL, cred);
}