diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/gfs2/ops_inode.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/gfs2/ops_inode.c b/fs/gfs2/ops_inode.c index 84051b997a43..911c115b5c6c 100644 --- a/fs/gfs2/ops_inode.c +++ b/fs/gfs2/ops_inode.c | |||
@@ -903,8 +903,8 @@ static int setattr_size(struct inode *inode, struct iattr *attr) | |||
903 | } | 903 | } |
904 | 904 | ||
905 | error = gfs2_truncatei(ip, attr->ia_size); | 905 | error = gfs2_truncatei(ip, attr->ia_size); |
906 | if (error) | 906 | if (error && (inode->i_size != ip->i_di.di_size)) |
907 | return error; | 907 | i_size_write(inode, ip->i_di.di_size); |
908 | 908 | ||
909 | return error; | 909 | return error; |
910 | } | 910 | } |