aboutsummaryrefslogtreecommitdiffstats
path: root/fs/omfs/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/omfs/file.c')
-rw-r--r--fs/omfs/file.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/fs/omfs/file.c b/fs/omfs/file.c
index 810cff346468..78c9f0c1a2f3 100644
--- a/fs/omfs/file.c
+++ b/fs/omfs/file.c
@@ -341,7 +341,19 @@ const struct file_operations omfs_file_operations = {
341 .splice_read = generic_file_splice_read, 341 .splice_read = generic_file_splice_read,
342}; 342};
343 343
344static int omfs_setattr(struct dentry *dentry, struct iattr *attr)
345{
346 struct inode *inode = dentry->d_inode;
347 int error;
348
349 error = inode_change_ok(inode, attr);
350 if (error)
351 return error;
352 return inode_setattr(inode, attr);
353}
354
344const struct inode_operations omfs_file_inops = { 355const struct inode_operations omfs_file_inops = {
356 .setattr = omfs_setattr,
345 .truncate = omfs_truncate 357 .truncate = omfs_truncate
346}; 358};
347 359