VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   32 Branches   54 Tags
author: Roman Zippel <zippel@linux-m68k.org> 2005-08-01 21:11:40 -0700 committer: Linus Torvalds <torvalds@g5.osdl.org> 2005-08-01 21:38:00 -0700 commit: f76d28d235cf777dd2e1c1d48c16ee10c1d1587f parent: 0072b1389c25355ccc01048114adb9652c13fd9f
Commit Summary:
[PATCH] hfs: don't dirty unchanged inode
Diffstat:
1 file changed, 2 insertions, 1 deletion
diff --git a/fs/hfs/extent.c b/fs/hfs/extent.c
index cbc8510ad222..5ea6b3d45eaa 100644
--- a/fs/hfs/extent.c
+++ b/fs/hfs/extent.c
@@ -482,7 +482,8 @@ void hfs_file_truncate(struct inode *inode)
 		page_cache_release(page);
 		mark_inode_dirty(inode);
 		return;
-	}
+	} else if (inode->i_size == HFS_I(inode)->phys_size)
+		return;
 	size = inode->i_size + HFS_SB(sb)->alloc_blksz - 1;
 	blk_cnt = size / HFS_SB(sb)->alloc_blksz;
 	alloc_cnt = HFS_I(inode)->alloc_blocks;