Merge branch 'sfc-3.9' of git://git.kernel.org/pub/scm/linux/kernel/git/bwh/sfc
[cascardo/linux.git] / fs / coda / cache.c
index 958ae0e..1da168c 100644 (file)
@@ -33,7 +33,7 @@ void coda_cache_enter(struct inode *inode, int mask)
 
        spin_lock(&cii->c_lock);
        cii->c_cached_epoch = atomic_read(&permission_epoch);
-       if (cii->c_uid != current_fsuid()) {
+       if (!uid_eq(cii->c_uid, current_fsuid())) {
                cii->c_uid = current_fsuid();
                 cii->c_cached_perm = mask;
         } else
@@ -65,7 +65,7 @@ int coda_cache_check(struct inode *inode, int mask)
        
        spin_lock(&cii->c_lock);
        hit = (mask & cii->c_cached_perm) == mask &&
-           cii->c_uid == current_fsuid() &&
+           uid_eq(cii->c_uid, current_fsuid()) &&
            cii->c_cached_epoch == atomic_read(&permission_epoch);
        spin_unlock(&cii->c_lock);