From 53ba46e4d134d941d291a8ef0d43fb44e6b6c3f2 Mon Sep 17 00:00:00 2001 From: "Eric W. Biederman" Date: Wed, 30 Jan 2013 19:36:06 -0800 Subject: [PATCH] --- yaml --- r: 357779 b: refs/heads/master c: 17499e332962e495b3ee2e5507e09b853ed6f607 h: refs/heads/master i: 357777: 240fcd231d28c9ed115b7d40e31e265a7a446392 357775: 9e6770cb4ee553ae91ab4bbc5e584f30dfba073a v: v3 --- [refs] | 2 +- trunk/fs/coda/cache.c | 4 ++-- trunk/fs/coda/coda_fs_i.h | 2 +- trunk/fs/coda/inode.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 6d70ea8628e5..69f3b2e35b10 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: d83f5901bc0cd7131a3b8534169ee889efc4c257 +refs/heads/master: 17499e332962e495b3ee2e5507e09b853ed6f607 diff --git a/trunk/fs/coda/cache.c b/trunk/fs/coda/cache.c index 958ae0e0ff8c..1da168c61d35 100644 --- a/trunk/fs/coda/cache.c +++ b/trunk/fs/coda/cache.c @@ -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); diff --git a/trunk/fs/coda/coda_fs_i.h b/trunk/fs/coda/coda_fs_i.h index b24fdfd8a3f0..c64075213218 100644 --- a/trunk/fs/coda/coda_fs_i.h +++ b/trunk/fs/coda/coda_fs_i.h @@ -25,7 +25,7 @@ struct coda_inode_info { u_short c_flags; /* flags (see below) */ unsigned int c_mapcount; /* nr of times this inode is mapped */ unsigned int c_cached_epoch; /* epoch for cached permissions */ - vuid_t c_uid; /* fsuid for cached permissions */ + kuid_t c_uid; /* fsuid for cached permissions */ unsigned int c_cached_perm; /* cached access permissions */ spinlock_t c_lock; struct inode vfs_inode; diff --git a/trunk/fs/coda/inode.c b/trunk/fs/coda/inode.c index 77bbaf4666a7..cf674e9179a3 100644 --- a/trunk/fs/coda/inode.c +++ b/trunk/fs/coda/inode.c @@ -49,7 +49,7 @@ static struct inode *coda_alloc_inode(struct super_block *sb) return NULL; memset(&ei->c_fid, 0, sizeof(struct CodaFid)); ei->c_flags = 0; - ei->c_uid = 0; + ei->c_uid = GLOBAL_ROOT_UID; ei->c_cached_perm = 0; spin_lock_init(&ei->c_lock); return &ei->vfs_inode;