Unionfs: use boolean type in unionfs_d_revalidate
authorErez_Zadok <ezk@cs.sunysb.edu>
Tue, 11 Sep 2007 00:10:31 +0000 (20:10 -0400)
committerErez Zadok <ezk@cs.sunysb.edu>
Wed, 20 May 2009 20:59:17 +0000 (16:59 -0400)
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
fs/unionfs/dentry.c

index 91f97802b203ec5e053774775e401ef82a319675..2db8ba535ab72a1bf82c0cee6fb8a20369f202a7 100644 (file)
@@ -411,18 +411,19 @@ out:
 
 static int unionfs_d_revalidate(struct dentry *dentry, struct nameidata *nd)
 {
-       int err;
+       bool valid;
 
        unionfs_read_lock(dentry->d_sb);
 
        unionfs_lock_dentry(dentry);
-       err = __unionfs_d_revalidate_chain(dentry, nd, false);
+       valid = __unionfs_d_revalidate_chain(dentry, nd, false);
        unionfs_unlock_dentry(dentry);
-       unionfs_check_dentry(dentry);
+       if (valid)
+               unionfs_check_dentry(dentry);
 
        unionfs_read_unlock(dentry->d_sb);
 
-       return err;
+       return valid;
 }
 
 /*