aboutsummaryrefslogtreecommitdiffstats
path: root/fs/fat
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2010-06-05 19:28:32 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2010-08-09 16:48:01 -0400
commitdeee3ce466a3e2cfb54c93b8fd22bbccd19ea7d6 (patch)
treee8335cb5ae3c3ee5ff9395b880e88d30c76a033e /fs/fat
parentd3b4f9ae184b0a3982dbe000ddf88952f090dc28 (diff)
covert fatfs to ->evict_inode()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/fat')
-rw-r--r--fs/fat/inode.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/fs/fat/inode.c b/fs/fat/inode.c
index ec6a699a4023..830058057d33 100644
--- a/fs/fat/inode.c
+++ b/fs/fat/inode.c
@@ -263,7 +263,7 @@ static const struct address_space_operations fat_aops = {
263 * check if the location is still valid and retry if it 263 * check if the location is still valid and retry if it
264 * isn't. Otherwise we do changes. 264 * isn't. Otherwise we do changes.
265 * 5. Spinlock is used to protect hash/unhash/location check/lookup 265 * 5. Spinlock is used to protect hash/unhash/location check/lookup
266 * 6. fat_clear_inode() unhashes the F-d-c entry. 266 * 6. fat_evict_inode() unhashes the F-d-c entry.
267 * 7. lookup() and readdir() do igrab() if they find a F-d-c entry 267 * 7. lookup() and readdir() do igrab() if they find a F-d-c entry
268 * and consider negative result as cache miss. 268 * and consider negative result as cache miss.
269 */ 269 */
@@ -448,16 +448,15 @@ out:
448 448
449EXPORT_SYMBOL_GPL(fat_build_inode); 449EXPORT_SYMBOL_GPL(fat_build_inode);
450 450
451static void fat_delete_inode(struct inode *inode) 451static void fat_evict_inode(struct inode *inode)
452{ 452{
453 truncate_inode_pages(&inode->i_data, 0); 453 truncate_inode_pages(&inode->i_data, 0);
454 inode->i_size = 0; 454 if (!inode->i_nlink) {
455 fat_truncate_blocks(inode, 0); 455 inode->i_size = 0;
456 clear_inode(inode); 456 fat_truncate_blocks(inode, 0);
457} 457 }
458 458 invalidate_inode_buffers(inode);
459static void fat_clear_inode(struct inode *inode) 459 end_writeback(inode);
460{
461 fat_cache_inval_inode(inode); 460 fat_cache_inval_inode(inode);
462 fat_detach(inode); 461 fat_detach(inode);
463} 462}
@@ -674,12 +673,11 @@ static const struct super_operations fat_sops = {
674 .alloc_inode = fat_alloc_inode, 673 .alloc_inode = fat_alloc_inode,
675 .destroy_inode = fat_destroy_inode, 674 .destroy_inode = fat_destroy_inode,
676 .write_inode = fat_write_inode, 675 .write_inode = fat_write_inode,
677 .delete_inode = fat_delete_inode, 676 .evict_inode = fat_evict_inode,
678 .put_super = fat_put_super, 677 .put_super = fat_put_super,
679 .write_super = fat_write_super, 678 .write_super = fat_write_super,
680 .sync_fs = fat_sync_fs, 679 .sync_fs = fat_sync_fs,
681 .statfs = fat_statfs, 680 .statfs = fat_statfs,
682 .clear_inode = fat_clear_inode,
683 .remount_fs = fat_remount, 681 .remount_fs = fat_remount,
684 682
685 .show_options = fat_show_options, 683 .show_options = fat_show_options,