diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2010-06-07 00:28:54 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2010-08-09 16:48:17 -0400 |
commit | 62aff86fdf18657d9eca7878654415f94f16d027 (patch) | |
tree | dba961bae38c78c7b2332e876d05f9bd692b2a16 /fs | |
parent | ea544009206baa03d606161656618900260b48e5 (diff) |
switch jfs to ->evict_inode()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/jfs/inode.c | 35 | ||||
-rw-r--r-- | fs/jfs/jfs_inode.h | 2 | ||||
-rw-r--r-- | fs/jfs/super.c | 8 |
3 files changed, 20 insertions, 25 deletions
diff --git a/fs/jfs/inode.c b/fs/jfs/inode.c index c38dc1806281..9978803ceedc 100644 --- a/fs/jfs/inode.c +++ b/fs/jfs/inode.c | |||
@@ -145,31 +145,32 @@ int jfs_write_inode(struct inode *inode, struct writeback_control *wbc) | |||
145 | return 0; | 145 | return 0; |
146 | } | 146 | } |
147 | 147 | ||
148 | void jfs_delete_inode(struct inode *inode) | 148 | void jfs_evict_inode(struct inode *inode) |
149 | { | 149 | { |
150 | jfs_info("In jfs_delete_inode, inode = 0x%p", inode); | 150 | jfs_info("In jfs_evict_inode, inode = 0x%p", inode); |
151 | 151 | ||
152 | if (!is_bad_inode(inode)) | 152 | if (!inode->i_nlink && !is_bad_inode(inode)) { |
153 | dquot_initialize(inode); | 153 | dquot_initialize(inode); |
154 | 154 | ||
155 | if (!is_bad_inode(inode) && | 155 | if (JFS_IP(inode)->fileset == FILESYSTEM_I) { |
156 | (JFS_IP(inode)->fileset == FILESYSTEM_I)) { | 156 | truncate_inode_pages(&inode->i_data, 0); |
157 | truncate_inode_pages(&inode->i_data, 0); | ||
158 | 157 | ||
159 | if (test_cflag(COMMIT_Freewmap, inode)) | 158 | if (test_cflag(COMMIT_Freewmap, inode)) |
160 | jfs_free_zero_link(inode); | 159 | jfs_free_zero_link(inode); |
161 | 160 | ||
162 | diFree(inode); | 161 | diFree(inode); |
163 | 162 | ||
164 | /* | 163 | /* |
165 | * Free the inode from the quota allocation. | 164 | * Free the inode from the quota allocation. |
166 | */ | 165 | */ |
167 | dquot_initialize(inode); | 166 | dquot_initialize(inode); |
168 | dquot_free_inode(inode); | 167 | dquot_free_inode(inode); |
169 | dquot_drop(inode); | 168 | } |
169 | } else { | ||
170 | truncate_inode_pages(&inode->i_data, 0); | ||
170 | } | 171 | } |
171 | 172 | end_writeback(inode); | |
172 | clear_inode(inode); | 173 | dquot_drop(inode); |
173 | } | 174 | } |
174 | 175 | ||
175 | void jfs_dirty_inode(struct inode *inode) | 176 | void jfs_dirty_inode(struct inode *inode) |
diff --git a/fs/jfs/jfs_inode.h b/fs/jfs/jfs_inode.h index 11042b1f44b5..155e91eff07d 100644 --- a/fs/jfs/jfs_inode.h +++ b/fs/jfs/jfs_inode.h | |||
@@ -27,7 +27,7 @@ extern long jfs_compat_ioctl(struct file *, unsigned int, unsigned long); | |||
27 | extern struct inode *jfs_iget(struct super_block *, unsigned long); | 27 | extern struct inode *jfs_iget(struct super_block *, unsigned long); |
28 | extern int jfs_commit_inode(struct inode *, int); | 28 | extern int jfs_commit_inode(struct inode *, int); |
29 | extern int jfs_write_inode(struct inode *, struct writeback_control *); | 29 | extern int jfs_write_inode(struct inode *, struct writeback_control *); |
30 | extern void jfs_delete_inode(struct inode *); | 30 | extern void jfs_evict_inode(struct inode *); |
31 | extern void jfs_dirty_inode(struct inode *); | 31 | extern void jfs_dirty_inode(struct inode *); |
32 | extern void jfs_truncate(struct inode *); | 32 | extern void jfs_truncate(struct inode *); |
33 | extern void jfs_truncate_nolock(struct inode *, loff_t); | 33 | extern void jfs_truncate_nolock(struct inode *, loff_t); |
diff --git a/fs/jfs/super.c b/fs/jfs/super.c index b38f96bef829..ec8c3e4baca3 100644 --- a/fs/jfs/super.c +++ b/fs/jfs/super.c | |||
@@ -132,11 +132,6 @@ static void jfs_destroy_inode(struct inode *inode) | |||
132 | kmem_cache_free(jfs_inode_cachep, ji); | 132 | kmem_cache_free(jfs_inode_cachep, ji); |
133 | } | 133 | } |
134 | 134 | ||
135 | static void jfs_clear_inode(struct inode *inode) | ||
136 | { | ||
137 | dquot_drop(inode); | ||
138 | } | ||
139 | |||
140 | static int jfs_statfs(struct dentry *dentry, struct kstatfs *buf) | 135 | static int jfs_statfs(struct dentry *dentry, struct kstatfs *buf) |
141 | { | 136 | { |
142 | struct jfs_sb_info *sbi = JFS_SBI(dentry->d_sb); | 137 | struct jfs_sb_info *sbi = JFS_SBI(dentry->d_sb); |
@@ -765,8 +760,7 @@ static const struct super_operations jfs_super_operations = { | |||
765 | .destroy_inode = jfs_destroy_inode, | 760 | .destroy_inode = jfs_destroy_inode, |
766 | .dirty_inode = jfs_dirty_inode, | 761 | .dirty_inode = jfs_dirty_inode, |
767 | .write_inode = jfs_write_inode, | 762 | .write_inode = jfs_write_inode, |
768 | .delete_inode = jfs_delete_inode, | 763 | .evict_inode = jfs_evict_inode, |
769 | .clear_inode = jfs_clear_inode, | ||
770 | .put_super = jfs_put_super, | 764 | .put_super = jfs_put_super, |
771 | .sync_fs = jfs_sync_fs, | 765 | .sync_fs = jfs_sync_fs, |
772 | .freeze_fs = jfs_freeze, | 766 | .freeze_fs = jfs_freeze, |