]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - fs/ntfs/attrib.c
NTFS: Fix ntfs_attr_make_non_resident() to update the vfs inode i_blocks
[karo-tx-linux.git] / fs / ntfs / attrib.c
index 380f70a5f2e13a7740e4fa00098f8ea4fe1b240f..8821e2d088b7bbad520088d29ccf46c668356654 100644 (file)
@@ -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