mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
fs/namei.c: don't pass namedata to lookup_dcache()
just the flags... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Change-Id: Ie885bc825aa80573489a60d3cbd6ab4d3975ea7e
This commit is contained in:
parent
f033032252
commit
fe5cfc12d0
1 changed files with 4 additions and 4 deletions
|
@ -1087,7 +1087,7 @@ static int follow_dotdot(struct nameidata *nd)
|
|||
* dir->d_inode->i_mutex must be held
|
||||
*/
|
||||
static struct dentry *lookup_dcache(struct qstr *name, struct dentry *dir,
|
||||
struct nameidata *nd, bool *need_lookup)
|
||||
unsigned int flags, bool *need_lookup)
|
||||
{
|
||||
struct dentry *dentry;
|
||||
int error;
|
||||
|
@ -1098,7 +1098,7 @@ static struct dentry *lookup_dcache(struct qstr *name, struct dentry *dir,
|
|||
if (d_need_lookup(dentry)) {
|
||||
*need_lookup = true;
|
||||
} else if (dentry->d_flags & DCACHE_OP_REVALIDATE) {
|
||||
error = d_revalidate(dentry, nd ? nd->flags : 0);
|
||||
error = d_revalidate(dentry, flags);
|
||||
if (unlikely(error <= 0)) {
|
||||
if (error < 0) {
|
||||
dput(dentry);
|
||||
|
@ -1152,7 +1152,7 @@ static struct dentry *__lookup_hash(struct qstr *name,
|
|||
bool need_lookup;
|
||||
struct dentry *dentry;
|
||||
|
||||
dentry = lookup_dcache(name, base, nd, &need_lookup);
|
||||
dentry = lookup_dcache(name, base, nd ? nd->flags : 0, &need_lookup);
|
||||
if (!need_lookup)
|
||||
return dentry;
|
||||
|
||||
|
@ -2456,7 +2456,7 @@ static int lookup_open(struct nameidata *nd, struct path *path,
|
|||
bool need_lookup;
|
||||
|
||||
*opened &= ~FILE_CREATED;
|
||||
dentry = lookup_dcache(&nd->last, dir, nd, &need_lookup);
|
||||
dentry = lookup_dcache(&nd->last, dir, nd->flags, &need_lookup);
|
||||
if (IS_ERR(dentry))
|
||||
return PTR_ERR(dentry);
|
||||
|
||||
|
|
Loading…
Reference in a new issue