aboutsummaryrefslogtreecommitdiffstats
path: root/fs/coda
diff options
context:
space:
mode:
authorJames Morris <jmorris@namei.org>2008-12-24 19:40:09 -0500
committerJames Morris <jmorris@namei.org>2008-12-24 19:40:09 -0500
commitcbacc2c7f066a1e01b33b0e27ae5efbf534bc2db (patch)
tree90d1093131d2a3543a8b3b1f3364e7c6f4081a93 /fs/coda
parent4a6908a3a050aacc9c3a2f36b276b46c0629ad91 (diff)
parent74192246910ff4fb95309ba1a683215644beeb62 (diff)
Merge branch 'next' into for-linus
Diffstat (limited to 'fs/coda')
-rw-r--r--fs/coda/cache.c6
-rw-r--r--fs/coda/file.c3
-rw-r--r--fs/coda/upcall.c2
3 files changed, 6 insertions, 5 deletions
diff --git a/fs/coda/cache.c b/fs/coda/cache.c
index 8a2370341c7a..a5bf5771a22a 100644
--- a/fs/coda/cache.c
+++ b/fs/coda/cache.c
@@ -32,8 +32,8 @@ void coda_cache_enter(struct inode *inode, int mask)
32 struct coda_inode_info *cii = ITOC(inode); 32 struct coda_inode_info *cii = ITOC(inode);
33 33
34 cii->c_cached_epoch = atomic_read(&permission_epoch); 34 cii->c_cached_epoch = atomic_read(&permission_epoch);
35 if (cii->c_uid != current->fsuid) { 35 if (cii->c_uid != current_fsuid()) {
36 cii->c_uid = current->fsuid; 36 cii->c_uid = current_fsuid();
37 cii->c_cached_perm = mask; 37 cii->c_cached_perm = mask;
38 } else 38 } else
39 cii->c_cached_perm |= mask; 39 cii->c_cached_perm |= mask;
@@ -60,7 +60,7 @@ int coda_cache_check(struct inode *inode, int mask)
60 int hit; 60 int hit;
61 61
62 hit = (mask & cii->c_cached_perm) == mask && 62 hit = (mask & cii->c_cached_perm) == mask &&
63 cii->c_uid == current->fsuid && 63 cii->c_uid == current_fsuid() &&
64 cii->c_cached_epoch == atomic_read(&permission_epoch); 64 cii->c_cached_epoch == atomic_read(&permission_epoch);
65 65
66 return hit; 66 return hit;
diff --git a/fs/coda/file.c b/fs/coda/file.c
index 29137ff3ca67..466303db2df6 100644
--- a/fs/coda/file.c
+++ b/fs/coda/file.c
@@ -13,6 +13,7 @@
13#include <linux/file.h> 13#include <linux/file.h>
14#include <linux/fs.h> 14#include <linux/fs.h>
15#include <linux/stat.h> 15#include <linux/stat.h>
16#include <linux/cred.h>
16#include <linux/errno.h> 17#include <linux/errno.h>
17#include <linux/smp_lock.h> 18#include <linux/smp_lock.h>
18#include <linux/string.h> 19#include <linux/string.h>
@@ -174,7 +175,7 @@ int coda_release(struct inode *coda_inode, struct file *coda_file)
174 BUG_ON(!cfi || cfi->cfi_magic != CODA_MAGIC); 175 BUG_ON(!cfi || cfi->cfi_magic != CODA_MAGIC);
175 176
176 err = venus_close(coda_inode->i_sb, coda_i2f(coda_inode), 177 err = venus_close(coda_inode->i_sb, coda_i2f(coda_inode),
177 coda_flags, coda_file->f_uid); 178 coda_flags, coda_file->f_cred->fsuid);
178 179
179 host_inode = cfi->cfi_container->f_path.dentry->d_inode; 180 host_inode = cfi->cfi_container->f_path.dentry->d_inode;
180 cii = ITOC(coda_inode); 181 cii = ITOC(coda_inode);
diff --git a/fs/coda/upcall.c b/fs/coda/upcall.c
index ce432bca95d1..c274d949179d 100644
--- a/fs/coda/upcall.c
+++ b/fs/coda/upcall.c
@@ -52,7 +52,7 @@ static void *alloc_upcall(int opcode, int size)
52 inp->ih.opcode = opcode; 52 inp->ih.opcode = opcode;
53 inp->ih.pid = current->pid; 53 inp->ih.pid = current->pid;
54 inp->ih.pgid = task_pgrp_nr(current); 54 inp->ih.pgid = task_pgrp_nr(current);
55 inp->ih.uid = current->fsuid; 55 inp->ih.uid = current_fsuid();
56 56
57 return (void*)inp; 57 return (void*)inp;
58} 58}