summaryrefslogtreecommitdiff
path: root/fs/hpfs
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2010-06-07 08:18:40 +0400
committerAl Viro <viro@zeniv.linux.org.uk>2010-08-10 00:48:17 +0400
commitea544009206baa03d606161656618900260b48e5 (patch)
treea79545189692c066db2deaebc4505168b155b3df /fs/hpfs
parent33b0daaa5557e9dadf4c27407fae7d316bab5686 (diff)
downloadlinux-ea544009206baa03d606161656618900260b48e5.tar.xz
switch hpfs to ->evict_inode()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/hpfs')
-rw-r--r--fs/hpfs/hpfs_fn.h2
-rw-r--r--fs/hpfs/inode.c12
-rw-r--r--fs/hpfs/super.c2
3 files changed, 9 insertions, 7 deletions
diff --git a/fs/hpfs/hpfs_fn.h b/fs/hpfs/hpfs_fn.h
index 75f9d4324851..b59eac0232a0 100644
--- a/fs/hpfs/hpfs_fn.h
+++ b/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/fs/hpfs/inode.c b/fs/hpfs/inode.c
index 3f3b397fd4e6..56f0da1cfd10 100644
--- a/fs/hpfs/inode.c
+++ b/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/fs/hpfs/super.c b/fs/hpfs/super.c
index aa53842c599c..2607010be2fe 100644
--- a/fs/hpfs/super.c
+++ b/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,