diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2010-06-06 10:16:41 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2010-08-09 16:48:06 -0400 |
commit | f053ddde7575090e09e2f5c4233d8a19f0925b93 (patch) | |
tree | b1eaf704f30a44f25a4e319df14b78f3c8cb2008 /fs/affs | |
parent | 69c9e750176b409559b2361fbb28fa7bbf3c5461 (diff) |
switch affs to ->evict_inode()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/affs')
-rw-r--r-- | fs/affs/affs.h | 3 | ||||
-rw-r--r-- | fs/affs/inode.c | 25 | ||||
-rw-r--r-- | fs/affs/super.c | 3 |
3 files changed, 14 insertions, 17 deletions
diff --git a/fs/affs/affs.h b/fs/affs/affs.h index f05b6155ccc8..a8cbdeb34025 100644 --- a/fs/affs/affs.h +++ b/fs/affs/affs.h | |||
@@ -171,8 +171,7 @@ extern int affs_rename(struct inode *old_dir, struct dentry *old_dentry, | |||
171 | extern unsigned long affs_parent_ino(struct inode *dir); | 171 | extern unsigned long affs_parent_ino(struct inode *dir); |
172 | extern struct inode *affs_new_inode(struct inode *dir); | 172 | extern struct inode *affs_new_inode(struct inode *dir); |
173 | extern int affs_notify_change(struct dentry *dentry, struct iattr *attr); | 173 | extern int affs_notify_change(struct dentry *dentry, struct iattr *attr); |
174 | extern void affs_delete_inode(struct inode *inode); | 174 | extern void affs_evict_inode(struct inode *inode); |
175 | extern void affs_clear_inode(struct inode *inode); | ||
176 | extern struct inode *affs_iget(struct super_block *sb, | 175 | extern struct inode *affs_iget(struct super_block *sb, |
177 | unsigned long ino); | 176 | unsigned long ino); |
178 | extern int affs_write_inode(struct inode *inode, | 177 | extern int affs_write_inode(struct inode *inode, |
diff --git a/fs/affs/inode.c b/fs/affs/inode.c index 6883d5fb84cf..3a0fdec175ba 100644 --- a/fs/affs/inode.c +++ b/fs/affs/inode.c | |||
@@ -252,23 +252,19 @@ out: | |||
252 | } | 252 | } |
253 | 253 | ||
254 | void | 254 | void |
255 | affs_delete_inode(struct inode *inode) | 255 | affs_evict_inode(struct inode *inode) |
256 | { | ||
257 | pr_debug("AFFS: delete_inode(ino=%lu, nlink=%u)\n", inode->i_ino, inode->i_nlink); | ||
258 | truncate_inode_pages(&inode->i_data, 0); | ||
259 | inode->i_size = 0; | ||
260 | affs_truncate(inode); | ||
261 | clear_inode(inode); | ||
262 | affs_free_block(inode->i_sb, inode->i_ino); | ||
263 | } | ||
264 | |||
265 | void | ||
266 | affs_clear_inode(struct inode *inode) | ||
267 | { | 256 | { |
268 | unsigned long cache_page; | 257 | unsigned long cache_page; |
258 | pr_debug("AFFS: evict_inode(ino=%lu, nlink=%u)\n", inode->i_ino, inode->i_nlink); | ||
259 | truncate_inode_pages(&inode->i_data, 0); | ||
269 | 260 | ||
270 | pr_debug("AFFS: clear_inode(ino=%lu, nlink=%u)\n", inode->i_ino, inode->i_nlink); | 261 | if (!inode->i_nlink) { |
262 | inode->i_size = 0; | ||
263 | affs_truncate(inode); | ||
264 | } | ||
271 | 265 | ||
266 | invalidate_inode_buffers(inode); | ||
267 | end_writeback(inode); | ||
272 | affs_free_prealloc(inode); | 268 | affs_free_prealloc(inode); |
273 | cache_page = (unsigned long)AFFS_I(inode)->i_lc; | 269 | cache_page = (unsigned long)AFFS_I(inode)->i_lc; |
274 | if (cache_page) { | 270 | if (cache_page) { |
@@ -280,6 +276,9 @@ affs_clear_inode(struct inode *inode) | |||
280 | affs_brelse(AFFS_I(inode)->i_ext_bh); | 276 | affs_brelse(AFFS_I(inode)->i_ext_bh); |
281 | AFFS_I(inode)->i_ext_last = ~1; | 277 | AFFS_I(inode)->i_ext_last = ~1; |
282 | AFFS_I(inode)->i_ext_bh = NULL; | 278 | AFFS_I(inode)->i_ext_bh = NULL; |
279 | |||
280 | if (!inode->i_nlink) | ||
281 | affs_free_block(inode->i_sb, inode->i_ino); | ||
283 | } | 282 | } |
284 | 283 | ||
285 | struct inode * | 284 | struct inode * |
diff --git a/fs/affs/super.c b/fs/affs/super.c index 16a3e4765f68..2c804a87c142 100644 --- a/fs/affs/super.c +++ b/fs/affs/super.c | |||
@@ -140,8 +140,7 @@ static const struct super_operations affs_sops = { | |||
140 | .alloc_inode = affs_alloc_inode, | 140 | .alloc_inode = affs_alloc_inode, |
141 | .destroy_inode = affs_destroy_inode, | 141 | .destroy_inode = affs_destroy_inode, |
142 | .write_inode = affs_write_inode, | 142 | .write_inode = affs_write_inode, |
143 | .delete_inode = affs_delete_inode, | 143 | .evict_inode = affs_evict_inode, |
144 | .clear_inode = affs_clear_inode, | ||
145 | .put_super = affs_put_super, | 144 | .put_super = affs_put_super, |
146 | .write_super = affs_write_super, | 145 | .write_super = affs_write_super, |
147 | .sync_fs = affs_sync_fs, | 146 | .sync_fs = affs_sync_fs, |