From 2fdfe9edc427b1aea0685b2e20866c45ad901ea9 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Sun, 6 Jun 2010 10:12:01 -0400 Subject: [PATCH] --- yaml --- r: 207552 b: refs/heads/master c: 69c9e750176b409559b2361fbb28fa7bbf3c5461 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/omfs/inode.c | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index 5989bf0f13a8..47f329e53994 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 9df2f85128def59185f8a1c584f8af41df17405a +refs/heads/master: 69c9e750176b409559b2361fbb28fa7bbf3c5461 diff --git a/trunk/fs/omfs/inode.c b/trunk/fs/omfs/inode.c index 089839a6cc64..56121debc22b 100644 --- a/trunk/fs/omfs/inode.c +++ b/trunk/fs/omfs/inode.c @@ -175,9 +175,13 @@ int omfs_sync_inode(struct inode *inode) * called when an entry is deleted, need to clear the bits in the * bitmaps. */ -static void omfs_delete_inode(struct inode *inode) +static void omfs_evict_inode(struct inode *inode) { truncate_inode_pages(&inode->i_data, 0); + end_writeback(inode); + + if (inode->i_nlink) + return; if (S_ISREG(inode->i_mode)) { inode->i_size = 0; @@ -185,7 +189,6 @@ static void omfs_delete_inode(struct inode *inode) } omfs_clear_range(inode->i_sb, inode->i_ino, 2); - clear_inode(inode); } struct inode *omfs_iget(struct super_block *sb, ino_t ino) @@ -284,7 +287,7 @@ static int omfs_statfs(struct dentry *dentry, struct kstatfs *buf) static const struct super_operations omfs_sops = { .write_inode = omfs_write_inode, - .delete_inode = omfs_delete_inode, + .evict_inode = omfs_evict_inode, .put_super = omfs_put_super, .statfs = omfs_statfs, .show_options = generic_show_options,