aboutsummaryrefslogtreecommitdiffstats
path: root/fs/afs/security.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2007-05-09 05:33:45 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-09 15:30:50 -0400
commit416351f28d2b31d15ff73e9aff699b2163704c95 (patch)
tree4b43838415b2cb95dfc66f9bc5fdb36b0f245e6c /fs/afs/security.c
parentef71c15c46a053818f7e69098ebb052b31ffa56b (diff)
AFS: AFS fixups
Make some miscellaneous changes to the AFS filesystem: (1) Assert RCU barriers on module exit to make sure RCU has finished with callbacks in this module. (2) Correctly handle the AFS server returning a zero-length read. (3) Split out data zapping calls into one function (afs_zap_data). (4) Rename some afs_file_*() functions to afs_*() where they apply to non-regular files too. (5) Be consistent about the presentation of volume ID:vnode ID in debugging output. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/afs/security.c')
-rw-r--r--fs/afs/security.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/fs/afs/security.c b/fs/afs/security.c
index f9f424d80458..e0ea88b63ebf 100644
--- a/fs/afs/security.c
+++ b/fs/afs/security.c
@@ -109,7 +109,7 @@ void afs_clear_permits(struct afs_vnode *vnode)
109{ 109{
110 struct afs_permits *permits; 110 struct afs_permits *permits;
111 111
112 _enter("{%x}", vnode->fid.vnode); 112 _enter("{%x:%u}", vnode->fid.vid, vnode->fid.vnode);
113 113
114 mutex_lock(&vnode->permits_lock); 114 mutex_lock(&vnode->permits_lock);
115 permits = vnode->permits; 115 permits = vnode->permits;
@@ -132,7 +132,8 @@ void afs_cache_permit(struct afs_vnode *vnode, struct key *key, long acl_order)
132 struct afs_vnode *auth_vnode; 132 struct afs_vnode *auth_vnode;
133 int count, loop; 133 int count, loop;
134 134
135 _enter("{%x},%x,%lx", vnode->fid.vnode, key_serial(key), acl_order); 135 _enter("{%x:%u},%x,%lx",
136 vnode->fid.vid, vnode->fid.vnode, key_serial(key), acl_order);
136 137
137 auth_vnode = afs_get_auth_inode(vnode, key); 138 auth_vnode = afs_get_auth_inode(vnode, key);
138 if (IS_ERR(auth_vnode)) { 139 if (IS_ERR(auth_vnode)) {
@@ -220,7 +221,8 @@ static int afs_check_permit(struct afs_vnode *vnode, struct key *key,
220 bool valid; 221 bool valid;
221 int loop, ret; 222 int loop, ret;
222 223
223 _enter(""); 224 _enter("{%x:%u},%x",
225 vnode->fid.vid, vnode->fid.vnode, key_serial(key));
224 226
225 auth_vnode = afs_get_auth_inode(vnode, key); 227 auth_vnode = afs_get_auth_inode(vnode, key);
226 if (IS_ERR(auth_vnode)) { 228 if (IS_ERR(auth_vnode)) {
@@ -268,9 +270,9 @@ static int afs_check_permit(struct afs_vnode *vnode, struct key *key,
268 _leave(" = %d", ret); 270 _leave(" = %d", ret);
269 return ret; 271 return ret;
270 } 272 }
273 *_access = vnode->status.caller_access;
271 } 274 }
272 275
273 *_access = vnode->status.caller_access;
274 iput(&auth_vnode->vfs_inode); 276 iput(&auth_vnode->vfs_inode);
275 _leave(" = 0 [access %x]", *_access); 277 _leave(" = 0 [access %x]", *_access);
276 return 0; 278 return 0;
@@ -288,7 +290,7 @@ int afs_permission(struct inode *inode, int mask, struct nameidata *nd)
288 struct key *key; 290 struct key *key;
289 int ret; 291 int ret;
290 292
291 _enter("{{%x:%x},%lx},%x,", 293 _enter("{{%x:%u},%lx},%x,",
292 vnode->fid.vid, vnode->fid.vnode, vnode->flags, mask); 294 vnode->fid.vid, vnode->fid.vnode, vnode->flags, mask);
293 295
294 key = afs_request_key(vnode->volume->cell); 296 key = afs_request_key(vnode->volume->cell);