diff options
Diffstat (limited to 'fs/ext2/inode.c')
-rw-r--r-- | fs/ext2/inode.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/ext2/inode.c b/fs/ext2/inode.c index 3cfcfd9a131a..c87840c33e17 100644 --- a/fs/ext2/inode.c +++ b/fs/ext2/inode.c | |||
@@ -58,6 +58,8 @@ static inline int ext2_inode_is_fast_symlink(struct inode *inode) | |||
58 | */ | 58 | */ |
59 | void ext2_delete_inode (struct inode * inode) | 59 | void ext2_delete_inode (struct inode * inode) |
60 | { | 60 | { |
61 | if (!is_bad_inode(inode)) | ||
62 | vfs_dq_init(inode); | ||
61 | truncate_inode_pages(&inode->i_data, 0); | 63 | truncate_inode_pages(&inode->i_data, 0); |
62 | 64 | ||
63 | if (is_bad_inode(inode)) | 65 | if (is_bad_inode(inode)) |
@@ -1457,6 +1459,9 @@ int ext2_setattr(struct dentry *dentry, struct iattr *iattr) | |||
1457 | error = inode_change_ok(inode, iattr); | 1459 | error = inode_change_ok(inode, iattr); |
1458 | if (error) | 1460 | if (error) |
1459 | return error; | 1461 | return error; |
1462 | |||
1463 | if (iattr->ia_valid & ATTR_SIZE) | ||
1464 | vfs_dq_init(inode); | ||
1460 | if ((iattr->ia_valid & ATTR_UID && iattr->ia_uid != inode->i_uid) || | 1465 | if ((iattr->ia_valid & ATTR_UID && iattr->ia_uid != inode->i_uid) || |
1461 | (iattr->ia_valid & ATTR_GID && iattr->ia_gid != inode->i_gid)) { | 1466 | (iattr->ia_valid & ATTR_GID && iattr->ia_gid != inode->i_gid)) { |
1462 | error = dquot_transfer(inode, iattr); | 1467 | error = dquot_transfer(inode, iattr); |