diff options
Diffstat (limited to 'fs/afs/inode.c')
-rw-r--r-- | fs/afs/inode.c | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/fs/afs/inode.c b/fs/afs/inode.c index c184a4ee5995..9c984cc42cc9 100644 --- a/fs/afs/inode.c +++ b/fs/afs/inode.c | |||
@@ -125,7 +125,7 @@ struct inode *afs_iget(struct super_block *sb, struct key *key, | |||
125 | struct inode *inode; | 125 | struct inode *inode; |
126 | int ret; | 126 | int ret; |
127 | 127 | ||
128 | _enter(",{%u,%u,%u},,", fid->vid, fid->vnode, fid->unique); | 128 | _enter(",{%x:%u.%u},,", fid->vid, fid->vnode, fid->unique); |
129 | 129 | ||
130 | as = sb->s_fs_info; | 130 | as = sb->s_fs_info; |
131 | data.volume = as->volume; | 131 | data.volume = as->volume; |
@@ -204,6 +204,19 @@ bad_inode: | |||
204 | } | 204 | } |
205 | 205 | ||
206 | /* | 206 | /* |
207 | * mark the data attached to an inode as obsolete due to a write on the server | ||
208 | * - might also want to ditch all the outstanding writes and dirty pages | ||
209 | */ | ||
210 | void afs_zap_data(struct afs_vnode *vnode) | ||
211 | { | ||
212 | kenter("zap data {%x:%u}", vnode->fid.vid, vnode->fid.vnode); | ||
213 | |||
214 | /* nuke all the non-dirty pages that aren't locked, mapped or being | ||
215 | * written back */ | ||
216 | invalidate_remote_inode(&vnode->vfs_inode); | ||
217 | } | ||
218 | |||
219 | /* | ||
207 | * validate a vnode/inode | 220 | * validate a vnode/inode |
208 | * - there are several things we need to check | 221 | * - there are several things we need to check |
209 | * - parent dir data changes (rm, rmdir, rename, mkdir, create, link, | 222 | * - parent dir data changes (rm, rmdir, rename, mkdir, create, link, |
@@ -258,10 +271,8 @@ int afs_validate(struct afs_vnode *vnode, struct key *key) | |||
258 | 271 | ||
259 | /* if the vnode's data version number changed then its contents are | 272 | /* if the vnode's data version number changed then its contents are |
260 | * different */ | 273 | * different */ |
261 | if (test_and_clear_bit(AFS_VNODE_ZAP_DATA, &vnode->flags)) { | 274 | if (test_and_clear_bit(AFS_VNODE_ZAP_DATA, &vnode->flags)) |
262 | _debug("zap data {%x:%d}", vnode->fid.vid, vnode->fid.vnode); | 275 | afs_zap_data(vnode); |
263 | invalidate_remote_inode(&vnode->vfs_inode); | ||
264 | } | ||
265 | 276 | ||
266 | clear_bit(AFS_VNODE_MODIFIED, &vnode->flags); | 277 | clear_bit(AFS_VNODE_MODIFIED, &vnode->flags); |
267 | mutex_unlock(&vnode->validate_lock); | 278 | mutex_unlock(&vnode->validate_lock); |
@@ -278,7 +289,7 @@ error_unlock: | |||
278 | /* | 289 | /* |
279 | * read the attributes of an inode | 290 | * read the attributes of an inode |
280 | */ | 291 | */ |
281 | int afs_inode_getattr(struct vfsmount *mnt, struct dentry *dentry, | 292 | int afs_getattr(struct vfsmount *mnt, struct dentry *dentry, |
282 | struct kstat *stat) | 293 | struct kstat *stat) |
283 | { | 294 | { |
284 | struct inode *inode; | 295 | struct inode *inode; |
@@ -301,7 +312,7 @@ void afs_clear_inode(struct inode *inode) | |||
301 | 312 | ||
302 | vnode = AFS_FS_I(inode); | 313 | vnode = AFS_FS_I(inode); |
303 | 314 | ||
304 | _enter("{%x:%d.%d} v=%u x=%u t=%u }", | 315 | _enter("{%x:%u.%d} v=%u x=%u t=%u }", |
305 | vnode->fid.vid, | 316 | vnode->fid.vid, |
306 | vnode->fid.vnode, | 317 | vnode->fid.vnode, |
307 | vnode->fid.unique, | 318 | vnode->fid.unique, |