We have to use an int, even though unionfs_d_revalidate calls other routines
that return only true/false, b/c ->d_revalidate is allowed to return a
negative errno number.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
static int unionfs_d_revalidate(struct dentry *dentry, struct nameidata *nd)
{
- bool valid;
+ int err;
unionfs_read_lock(dentry->d_sb);
unionfs_lock_dentry(dentry);
- valid = __unionfs_d_revalidate_chain(dentry, nd, false);
+ err = __unionfs_d_revalidate_chain(dentry, nd, false);
unionfs_unlock_dentry(dentry);
- if (valid)
+ if (err > 0) /* true==1: dentry is valid */
unionfs_check_dentry(dentry);
unionfs_read_unlock(dentry->d_sb);
- return valid;
+ return err;
}
/*