Unionfs: use int in unionfs_d_revalidate
authorErez_Zadok <ezk@cs.sunysb.edu>
Thu, 20 Sep 2007 01:18:35 +0000 (21:18 -0400)
committerErez Zadok <ezk@cs.sunysb.edu>
Mon, 12 Jan 2009 23:20:38 +0000 (18:20 -0500)
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>
fs/unionfs/dentry.c

index 2db8ba535ab72a1bf82c0cee6fb8a20369f202a7..9e0742d8ebbe9bb6422b5a8eaae2fe7411bb74e0 100644 (file)
@@ -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;
 }
 
 /*