ovl: use an auxiliary var for overlay root entry
Signed-off-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
This commit is contained in:
parent
3a1e819b4e
commit
c22205d058
|
@ -220,6 +220,7 @@ struct dentry *ovl_lookup(struct inode *dir, struct dentry *dentry,
|
||||||
const struct cred *old_cred;
|
const struct cred *old_cred;
|
||||||
struct ovl_fs *ofs = dentry->d_sb->s_fs_info;
|
struct ovl_fs *ofs = dentry->d_sb->s_fs_info;
|
||||||
struct ovl_entry *poe = dentry->d_parent->d_fsdata;
|
struct ovl_entry *poe = dentry->d_parent->d_fsdata;
|
||||||
|
struct ovl_entry *roe = dentry->d_sb->s_root->d_fsdata;
|
||||||
struct path *stack = NULL;
|
struct path *stack = NULL;
|
||||||
struct dentry *upperdir, *upperdentry = NULL;
|
struct dentry *upperdir, *upperdentry = NULL;
|
||||||
unsigned int ctr = 0;
|
unsigned int ctr = 0;
|
||||||
|
@ -259,7 +260,7 @@ struct dentry *ovl_lookup(struct inode *dir, struct dentry *dentry,
|
||||||
if (!upperredirect)
|
if (!upperredirect)
|
||||||
goto out_put_upper;
|
goto out_put_upper;
|
||||||
if (d.redirect[0] == '/')
|
if (d.redirect[0] == '/')
|
||||||
poe = dentry->d_sb->s_root->d_fsdata;
|
poe = roe;
|
||||||
}
|
}
|
||||||
upperopaque = d.opaque;
|
upperopaque = d.opaque;
|
||||||
}
|
}
|
||||||
|
@ -290,10 +291,8 @@ struct dentry *ovl_lookup(struct inode *dir, struct dentry *dentry,
|
||||||
if (d.stop)
|
if (d.stop)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (d.redirect &&
|
if (d.redirect && d.redirect[0] == '/' && poe != roe) {
|
||||||
d.redirect[0] == '/' &&
|
poe = roe;
|
||||||
poe != dentry->d_sb->s_root->d_fsdata) {
|
|
||||||
poe = dentry->d_sb->s_root->d_fsdata;
|
|
||||||
|
|
||||||
/* Find the current layer on the root dentry */
|
/* Find the current layer on the root dentry */
|
||||||
for (i = 0; i < poe->numlower; i++)
|
for (i = 0; i < poe->numlower; i++)
|
||||||
|
|
Loading…
Reference in New Issue