summaryrefslogtreecommitdiffstats
path: root/fs/ntfs/attrib.c
diff options
context:
space:
mode:
authorAnton Altaparmakov <aia21@cantab.net>2005-10-04 15:57:15 +0200
committerAnton Altaparmakov <aia21@cantab.net>2005-10-04 15:57:15 +0200
commit2a6fc4e1b0f7d2ec3711d5b1782fb30f78cca765 (patch)
treea123e9bb2c7d17aade84b1d1cc2decafdeace121 /fs/ntfs/attrib.c
parentNTFS: Change ntfs_attr_make_non_resident to take the attribute value size (diff)
downloadlinux-2a6fc4e1b0f7d2ec3711d5b1782fb30f78cca765.tar.xz
linux-2a6fc4e1b0f7d2ec3711d5b1782fb30f78cca765.zip
NTFS: Fix ntfs_attr_make_non_resident() to update the vfs inode i_blocks
which is zero for a resident attribute but should no longer be zero once the attribute is non-resident as it then has real clusters allocated. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
Diffstat (limited to 'fs/ntfs/attrib.c')
-rw-r--r--fs/ntfs/attrib.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/ntfs/attrib.c b/fs/ntfs/attrib.c
index 380f70a5f2e1..8821e2d088b7 100644
--- a/fs/ntfs/attrib.c
+++ b/fs/ntfs/attrib.c
@@ -1719,7 +1719,9 @@ int ntfs_attr_make_non_resident(ntfs_inode *ni, const u32 data_size)
ffs(ni->itype.compressed.block_size) - 1;
ni->itype.compressed.block_clusters = 1U <<
a->data.non_resident.compression_unit;
- }
+ vi->i_blocks = ni->itype.compressed.size >> 9;
+ } else
+ vi->i_blocks = ni->allocated_size >> 9;
write_unlock_irqrestore(&ni->size_lock, flags);
/*
* This needs to be last since the address space operations ->readpage