From 4f00bae5fd2dd6da09b3153bebb6a5e87a5fcc77 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Mon, 7 Jun 2010 00:18:40 -0400 Subject: [PATCH] --- yaml --- r: 207567 b: refs/heads/master c: ea544009206baa03d606161656618900260b48e5 h: refs/heads/master i: 207565: a25f2e6a66d01c4fc6c4f7e6d4e0620a1cf40ff0 207563: 38d189f5a70585fd6c3cf32a31c4c80c3a9eb421 207559: 54304765dc48d211a7b20cb10baf1560e8b04cda 207551: b9f742e343564af7544330f4fcff493f066a9b6b v: v3 --- [refs] | 2 +- trunk/fs/hpfs/hpfs_fn.h | 2 +- trunk/fs/hpfs/inode.c | 12 +++++++----- trunk/fs/hpfs/super.c | 2 +- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/[refs] b/[refs] index ff718d2b8c1d..db51f7344d6e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 33b0daaa5557e9dadf4c27407fae7d316bab5686 +refs/heads/master: ea544009206baa03d606161656618900260b48e5 diff --git a/trunk/fs/hpfs/hpfs_fn.h b/trunk/fs/hpfs/hpfs_fn.h index 75f9d4324851..b59eac0232a0 100644 --- a/trunk/fs/hpfs/hpfs_fn.h +++ b/trunk/fs/hpfs/hpfs_fn.h @@ -281,7 +281,7 @@ void hpfs_write_inode(struct inode *); void hpfs_write_inode_nolock(struct inode *); int hpfs_setattr(struct dentry *, struct iattr *); void hpfs_write_if_changed(struct inode *); -void hpfs_delete_inode(struct inode *); +void hpfs_evict_inode(struct inode *); /* map.c */ diff --git a/trunk/fs/hpfs/inode.c b/trunk/fs/hpfs/inode.c index 3f3b397fd4e6..56f0da1cfd10 100644 --- a/trunk/fs/hpfs/inode.c +++ b/trunk/fs/hpfs/inode.c @@ -302,11 +302,13 @@ void hpfs_write_if_changed(struct inode *inode) hpfs_write_inode(inode); } -void hpfs_delete_inode(struct inode *inode) +void hpfs_evict_inode(struct inode *inode) { truncate_inode_pages(&inode->i_data, 0); - lock_kernel(); - hpfs_remove_fnode(inode->i_sb, inode->i_ino); - unlock_kernel(); - clear_inode(inode); + end_writeback(inode); + if (!inode->i_nlink) { + lock_kernel(); + hpfs_remove_fnode(inode->i_sb, inode->i_ino); + unlock_kernel(); + } } diff --git a/trunk/fs/hpfs/super.c b/trunk/fs/hpfs/super.c index aa53842c599c..2607010be2fe 100644 --- a/trunk/fs/hpfs/super.c +++ b/trunk/fs/hpfs/super.c @@ -450,7 +450,7 @@ static const struct super_operations hpfs_sops = { .alloc_inode = hpfs_alloc_inode, .destroy_inode = hpfs_destroy_inode, - .delete_inode = hpfs_delete_inode, + .evict_inode = hpfs_evict_inode, .put_super = hpfs_put_super, .statfs = hpfs_statfs, .remount_fs = hpfs_remount_fs,