diff options
author | David Howells <dhowells@redhat.com> | 2007-05-09 05:33:45 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-09 15:30:50 -0400 |
commit | 416351f28d2b31d15ff73e9aff699b2163704c95 (patch) | |
tree | 4b43838415b2cb95dfc66f9bc5fdb36b0f245e6c /fs/afs/callback.c | |
parent | ef71c15c46a053818f7e69098ebb052b31ffa56b (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/callback.c')
-rw-r--r-- | fs/afs/callback.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/fs/afs/callback.c b/fs/afs/callback.c index 9bdbf36a9aa9..f64e40fefc02 100644 --- a/fs/afs/callback.c +++ b/fs/afs/callback.c | |||
@@ -44,7 +44,7 @@ void afs_init_callback_state(struct afs_server *server) | |||
44 | while (!RB_EMPTY_ROOT(&server->cb_promises)) { | 44 | while (!RB_EMPTY_ROOT(&server->cb_promises)) { |
45 | vnode = rb_entry(server->cb_promises.rb_node, | 45 | vnode = rb_entry(server->cb_promises.rb_node, |
46 | struct afs_vnode, cb_promise); | 46 | struct afs_vnode, cb_promise); |
47 | _debug("UNPROMISE { vid=%x vn=%u uq=%u}", | 47 | _debug("UNPROMISE { vid=%x:%u uq=%u}", |
48 | vnode->fid.vid, vnode->fid.vnode, vnode->fid.unique); | 48 | vnode->fid.vid, vnode->fid.vnode, vnode->fid.unique); |
49 | rb_erase(&vnode->cb_promise, &server->cb_promises); | 49 | rb_erase(&vnode->cb_promise, &server->cb_promises); |
50 | vnode->cb_promised = false; | 50 | vnode->cb_promised = false; |
@@ -84,11 +84,8 @@ void afs_broken_callback_work(struct work_struct *work) | |||
84 | 84 | ||
85 | /* if the vnode's data version number changed then its contents | 85 | /* if the vnode's data version number changed then its contents |
86 | * are different */ | 86 | * are different */ |
87 | if (test_and_clear_bit(AFS_VNODE_ZAP_DATA, &vnode->flags)) { | 87 | if (test_and_clear_bit(AFS_VNODE_ZAP_DATA, &vnode->flags)) |
88 | _debug("zap data {%x:%u}", | 88 | afs_zap_data(vnode); |
89 | vnode->fid.vid, vnode->fid.vnode); | ||
90 | invalidate_remote_inode(&vnode->vfs_inode); | ||
91 | } | ||
92 | } | 89 | } |
93 | 90 | ||
94 | out: | 91 | out: |