GIT: unionfs2-2.6.27.y: Unionfs: use int in unionfs_d_revalidate

Erez Zadok ezk at fsl.cs.sunysb.edu
Thu Aug 12 23:17:01 EDT 2010


commit 1ab10220492d38e8017084ebd7219e62d0d0d1e0
Author: Erez_Zadok <ezk at cs.sunysb.edu>
Date:   Wed Sep 19 21:18:35 2007 -0400

    Unionfs: use int in unionfs_d_revalidate
    
    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 at cs.sunysb.edu>

diff --git a/fs/unionfs/dentry.c b/fs/unionfs/dentry.c
index 2db8ba5..9e0742d 100644
--- a/fs/unionfs/dentry.c
+++ b/fs/unionfs/dentry.c
@@ -411,19 +411,19 @@ out:
 
 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;
 }
 
 /*


More information about the unionfs-cvs mailing list