Commit c54719c9 authored by Al Viro's avatar Al Viro Committed by Amir Goldstein

ovl: fetch inode once in ovl_dentry_revalidate_common()

d_inode_rcu() is right - we might be in rcu pathwalk;
however, OVL_E() hides plain d_inode() on the same dentry...

Fixes: a6ff2bc0 ("ovl: use OVL_E() and OVL_E_FLAGS() accessors")
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarAmir Goldstein <amir73il@gmail.com>
parent d9e8319a
...@@ -104,8 +104,8 @@ static int ovl_revalidate_real(struct dentry *d, unsigned int flags, bool weak) ...@@ -104,8 +104,8 @@ static int ovl_revalidate_real(struct dentry *d, unsigned int flags, bool weak)
static int ovl_dentry_revalidate_common(struct dentry *dentry, static int ovl_dentry_revalidate_common(struct dentry *dentry,
unsigned int flags, bool weak) unsigned int flags, bool weak)
{ {
struct ovl_entry *oe = OVL_E(dentry); struct ovl_entry *oe;
struct ovl_path *lowerstack = ovl_lowerstack(oe); struct ovl_path *lowerstack;
struct inode *inode = d_inode_rcu(dentry); struct inode *inode = d_inode_rcu(dentry);
struct dentry *upper; struct dentry *upper;
unsigned int i; unsigned int i;
...@@ -115,6 +115,8 @@ static int ovl_dentry_revalidate_common(struct dentry *dentry, ...@@ -115,6 +115,8 @@ static int ovl_dentry_revalidate_common(struct dentry *dentry,
if (!inode) if (!inode)
return -ECHILD; return -ECHILD;
oe = OVL_I_E(inode);
lowerstack = ovl_lowerstack(oe);
upper = ovl_i_dentry_upper(inode); upper = ovl_i_dentry_upper(inode);
if (upper) if (upper)
ret = ovl_revalidate_real(upper, flags, weak); ret = ovl_revalidate_real(upper, flags, weak);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment