]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
switch hpfs to ->evict_inode()
authorAl Viro <viro@zeniv.linux.org.uk>
Mon, 7 Jun 2010 04:18:40 +0000 (00:18 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Mon, 9 Aug 2010 20:48:17 +0000 (16:48 -0400)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/hpfs/hpfs_fn.h
fs/hpfs/inode.c
fs/hpfs/super.c

index 75f9d43248511843334923c2f38b7f1e36d47245..b59eac0232a0f057063fac03d747a8b627560056 100644 (file)
@@ -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 */
 
index 3f3b397fd4e6c5f132045379a7d2f191641c85ea..56f0da1cfd106ce97a6dfcf1222b2416275dd98b 100644 (file)
@@ -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();
+       }
 }
index aa53842c599c2eec917086af4d2c8b1d2fea1384..2607010be2fe5019b9700926d57c0f272be79f17 100644 (file)
@@ -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,