aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/fat/inode.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/fs/fat/inode.c b/fs/fat/inode.c
index 53f3cf62b7c1..f22f287e507a 100644
--- a/fs/fat/inode.c
+++ b/fs/fat/inode.c
@@ -433,11 +433,8 @@ EXPORT_SYMBOL_GPL(fat_build_inode);
433static void fat_delete_inode(struct inode *inode) 433static void fat_delete_inode(struct inode *inode)
434{ 434{
435 truncate_inode_pages(&inode->i_data, 0); 435 truncate_inode_pages(&inode->i_data, 0);
436 436 inode->i_size = 0;
437 if (!is_bad_inode(inode)) { 437 fat_truncate(inode);
438 inode->i_size = 0;
439 fat_truncate(inode);
440 }
441 clear_inode(inode); 438 clear_inode(inode);
442} 439}
443 440
@@ -445,8 +442,6 @@ static void fat_clear_inode(struct inode *inode)
445{ 442{
446 struct msdos_sb_info *sbi = MSDOS_SB(inode->i_sb); 443 struct msdos_sb_info *sbi = MSDOS_SB(inode->i_sb);
447 444
448 if (is_bad_inode(inode))
449 return;
450 lock_kernel(); 445 lock_kernel();
451 spin_lock(&sbi->inode_hash_lock); 446 spin_lock(&sbi->inode_hash_lock);
452 fat_cache_inval_inode(inode); 447 fat_cache_inval_inode(inode);