diff options
Diffstat (limited to 'fs/ext4/inode.c')
-rw-r--r-- | fs/ext4/inode.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 0757634..7f0e15e 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -4598,6 +4598,10 @@ int ext4_setattr(struct dentry *dentry, struct iattr *attr) if (attr->ia_size > sbi->s_bitmap_maxbytes) return -EFBIG; } + + if (IS_I_VERSION(inode) && attr->ia_size != inode->i_size) + inode_inc_iversion(inode); + if (S_ISREG(inode->i_mode) && (attr->ia_size < inode->i_size)) { if (ext4_should_order_data(inode)) { |