diff options
Diffstat (limited to 'fs/logfs/file.c')
-rw-r--r-- | fs/logfs/file.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/logfs/file.c b/fs/logfs/file.c index 23b4d03bbd26..4dd0f7c06e39 100644 --- a/fs/logfs/file.c +++ b/fs/logfs/file.c | |||
@@ -232,16 +232,16 @@ static int logfs_setattr(struct dentry *dentry, struct iattr *attr) | |||
232 | struct inode *inode = dentry->d_inode; | 232 | struct inode *inode = dentry->d_inode; |
233 | int err = 0; | 233 | int err = 0; |
234 | 234 | ||
235 | err = inode_change_ok(inode, attr); | ||
236 | if (err) | ||
237 | return err; | ||
238 | |||
235 | if (attr->ia_valid & ATTR_SIZE) { | 239 | if (attr->ia_valid & ATTR_SIZE) { |
236 | err = logfs_truncate(inode, attr->ia_size); | 240 | err = logfs_truncate(inode, attr->ia_size); |
237 | if (err) | 241 | if (err) |
238 | return err; | 242 | return err; |
239 | } | 243 | } |
240 | 244 | ||
241 | err = inode_change_ok(inode, attr); | ||
242 | if (err) | ||
243 | return err; | ||
244 | |||
245 | setattr_copy(inode, attr); | 245 | setattr_copy(inode, attr); |
246 | mark_inode_dirty(inode); | 246 | mark_inode_dirty(inode); |
247 | return 0; | 247 | return 0; |