aboutsummaryrefslogtreecommitdiffstats
path: root/fs/afs/inode.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2007-05-11 01:22:20 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-11 11:29:32 -0400
commit0f300ca9284caabdd2c07c7f91b90f1f530f614e (patch)
tree12c64af9cbaeafbe47e63872a750badb623a7e81 /fs/afs/inode.c
parent9d577b6a31a53a19d3b0fe414d645a61ef201846 (diff)
AFS: fix a couple of problems with unlinking AFS files
Fix a couple of problems with unlinking AFS files. (1) The parent directory wasn't being updated properly between unlink() and the following lookup(). It seems that, for some reason, invalidate_remote_inode() wasn't discarding the directory contents correctly, so this patch calls invalidate_inode_pages2() instead on non-regular files. (2) afs_vnode_deleted_remotely() should handle vnodes that don't have a source server recorded without oopsing. 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/inode.c')
-rw-r--r--fs/afs/inode.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/fs/afs/inode.c b/fs/afs/inode.c
index 515a5d12d8fb..47f5fed7195d 100644
--- a/fs/afs/inode.c
+++ b/fs/afs/inode.c
@@ -209,11 +209,15 @@ bad_inode:
209 */ 209 */
210void afs_zap_data(struct afs_vnode *vnode) 210void afs_zap_data(struct afs_vnode *vnode)
211{ 211{
212 _enter("zap data {%x:%u}", vnode->fid.vid, vnode->fid.vnode); 212 _enter("{%x:%u}", vnode->fid.vid, vnode->fid.vnode);
213 213
214 /* nuke all the non-dirty pages that aren't locked, mapped or being 214 /* nuke all the non-dirty pages that aren't locked, mapped or being
215 * written back */ 215 * written back in a regular file and completely discard the pages in a
216 invalidate_remote_inode(&vnode->vfs_inode); 216 * directory or symlink */
217 if (S_ISREG(vnode->vfs_inode.i_mode))
218 invalidate_remote_inode(&vnode->vfs_inode);
219 else
220 invalidate_inode_pages2(vnode->vfs_inode.i_mapping);
217} 221}
218 222
219/* 223/*