diff options
Diffstat (limited to 'fs/coda')
-rw-r--r-- | fs/coda/cache.c | 4 | ||||
-rw-r--r-- | fs/coda/coda_fs_i.h | 2 | ||||
-rw-r--r-- | fs/coda/inode.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/fs/coda/cache.c b/fs/coda/cache.c index 958ae0e0ff8c..1da168c61d35 100644 --- a/fs/coda/cache.c +++ b/fs/coda/cache.c | |||
@@ -33,7 +33,7 @@ void coda_cache_enter(struct inode *inode, int mask) | |||
33 | 33 | ||
34 | spin_lock(&cii->c_lock); | 34 | spin_lock(&cii->c_lock); |
35 | cii->c_cached_epoch = atomic_read(&permission_epoch); | 35 | cii->c_cached_epoch = atomic_read(&permission_epoch); |
36 | if (cii->c_uid != current_fsuid()) { | 36 | if (!uid_eq(cii->c_uid, current_fsuid())) { |
37 | cii->c_uid = current_fsuid(); | 37 | cii->c_uid = current_fsuid(); |
38 | cii->c_cached_perm = mask; | 38 | cii->c_cached_perm = mask; |
39 | } else | 39 | } else |
@@ -65,7 +65,7 @@ int coda_cache_check(struct inode *inode, int mask) | |||
65 | 65 | ||
66 | spin_lock(&cii->c_lock); | 66 | spin_lock(&cii->c_lock); |
67 | hit = (mask & cii->c_cached_perm) == mask && | 67 | hit = (mask & cii->c_cached_perm) == mask && |
68 | cii->c_uid == current_fsuid() && | 68 | uid_eq(cii->c_uid, current_fsuid()) && |
69 | cii->c_cached_epoch == atomic_read(&permission_epoch); | 69 | cii->c_cached_epoch == atomic_read(&permission_epoch); |
70 | spin_unlock(&cii->c_lock); | 70 | spin_unlock(&cii->c_lock); |
71 | 71 | ||
diff --git a/fs/coda/coda_fs_i.h b/fs/coda/coda_fs_i.h index b24fdfd8a3f0..c64075213218 100644 --- a/fs/coda/coda_fs_i.h +++ b/fs/coda/coda_fs_i.h | |||
@@ -25,7 +25,7 @@ struct coda_inode_info { | |||
25 | u_short c_flags; /* flags (see below) */ | 25 | u_short c_flags; /* flags (see below) */ |
26 | unsigned int c_mapcount; /* nr of times this inode is mapped */ | 26 | unsigned int c_mapcount; /* nr of times this inode is mapped */ |
27 | unsigned int c_cached_epoch; /* epoch for cached permissions */ | 27 | unsigned int c_cached_epoch; /* epoch for cached permissions */ |
28 | vuid_t c_uid; /* fsuid for cached permissions */ | 28 | kuid_t c_uid; /* fsuid for cached permissions */ |
29 | unsigned int c_cached_perm; /* cached access permissions */ | 29 | unsigned int c_cached_perm; /* cached access permissions */ |
30 | spinlock_t c_lock; | 30 | spinlock_t c_lock; |
31 | struct inode vfs_inode; | 31 | struct inode vfs_inode; |
diff --git a/fs/coda/inode.c b/fs/coda/inode.c index 77bbaf4666a7..cf674e9179a3 100644 --- a/fs/coda/inode.c +++ b/fs/coda/inode.c | |||
@@ -49,7 +49,7 @@ static struct inode *coda_alloc_inode(struct super_block *sb) | |||
49 | return NULL; | 49 | return NULL; |
50 | memset(&ei->c_fid, 0, sizeof(struct CodaFid)); | 50 | memset(&ei->c_fid, 0, sizeof(struct CodaFid)); |
51 | ei->c_flags = 0; | 51 | ei->c_flags = 0; |
52 | ei->c_uid = 0; | 52 | ei->c_uid = GLOBAL_ROOT_UID; |
53 | ei->c_cached_perm = 0; | 53 | ei->c_cached_perm = 0; |
54 | spin_lock_init(&ei->c_lock); | 54 | spin_lock_init(&ei->c_lock); |
55 | return &ei->vfs_inode; | 55 | return &ei->vfs_inode; |