提交 3754a544 编写于 作者: O OGAWA Hirofumi 提交者: Linus Torvalds

fat: kill is_bad_inode() check

FAT doesn't need to check bad inode anymore.
Signed-off-by: NOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 d5dee5c3
...@@ -433,11 +433,8 @@ EXPORT_SYMBOL_GPL(fat_build_inode); ...@@ -433,11 +433,8 @@ EXPORT_SYMBOL_GPL(fat_build_inode);
static void fat_delete_inode(struct inode *inode) static void fat_delete_inode(struct inode *inode)
{ {
truncate_inode_pages(&inode->i_data, 0); truncate_inode_pages(&inode->i_data, 0);
inode->i_size = 0;
if (!is_bad_inode(inode)) { fat_truncate(inode);
inode->i_size = 0;
fat_truncate(inode);
}
clear_inode(inode); clear_inode(inode);
} }
...@@ -445,8 +442,6 @@ static void fat_clear_inode(struct inode *inode) ...@@ -445,8 +442,6 @@ static void fat_clear_inode(struct inode *inode)
{ {
struct msdos_sb_info *sbi = MSDOS_SB(inode->i_sb); struct msdos_sb_info *sbi = MSDOS_SB(inode->i_sb);
if (is_bad_inode(inode))
return;
lock_kernel(); lock_kernel();
spin_lock(&sbi->inode_hash_lock); spin_lock(&sbi->inode_hash_lock);
fat_cache_inval_inode(inode); fat_cache_inval_inode(inode);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册