summaryrefslogtreecommitdiff
path: root/fs/hfsplus
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2005-08-15 07:10:26 +0400
committerJeff Garzik <jgarzik@pobox.com>2005-08-15 07:10:26 +0400
commit20445cc9159089d9d6b88d7864578efb10eb6590 (patch)
treefbbb27fd8baa82c77ebc4e020e8ee9ddb57e3ae2 /fs/hfsplus
parent4339d328631aa815fe2181b9164b3690ca2db4da (diff)
parent4c0e176dd5e4c44dd60f398518f75eedbe1a65f3 (diff)
downloadlinux-20445cc9159089d9d6b88d7864578efb10eb6590.tar.xz
/spare/repo/netdev-2.6 branch 'ieee80211'
Diffstat (limited to 'fs/hfsplus')
-rw-r--r--fs/hfsplus/bnode.c2
-rw-r--r--fs/hfsplus/extents.c4
2 files changed, 5 insertions, 1 deletions
diff --git a/fs/hfsplus/bnode.c b/fs/hfsplus/bnode.c
index 267872e84d71..8868d3b766fd 100644
--- a/fs/hfsplus/bnode.c
+++ b/fs/hfsplus/bnode.c
@@ -643,6 +643,8 @@ void hfs_bnode_put(struct hfs_bnode *node)
return;
}
for (i = 0; i < tree->pages_per_bnode; i++) {
+ if (!node->page[i])
+ continue;
mark_page_accessed(node->page[i]);
#if REF_PAGES
put_page(node->page[i]);
diff --git a/fs/hfsplus/extents.c b/fs/hfsplus/extents.c
index 376498cc64fd..e7235ca79a95 100644
--- a/fs/hfsplus/extents.c
+++ b/fs/hfsplus/extents.c
@@ -461,7 +461,9 @@ void hfsplus_file_truncate(struct inode *inode)
page_cache_release(page);
mark_inode_dirty(inode);
return;
- }
+ } else if (inode->i_size == HFSPLUS_I(inode).phys_size)
+ return;
+
blk_cnt = (inode->i_size + HFSPLUS_SB(sb).alloc_blksz - 1) >> HFSPLUS_SB(sb).alloc_blksz_shift;
alloc_cnt = HFSPLUS_I(inode).alloc_blocks;
if (blk_cnt == alloc_cnt)