diff options
Diffstat (limited to 'fs/sysv/file.c')
-rw-r--r-- | fs/sysv/file.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/fs/sysv/file.c b/fs/sysv/file.c index 750cc22349bd..94f6319292a1 100644 --- a/fs/sysv/file.c +++ b/fs/sysv/file.c | |||
@@ -30,7 +30,19 @@ const struct file_operations sysv_file_operations = { | |||
30 | .splice_read = generic_file_splice_read, | 30 | .splice_read = generic_file_splice_read, |
31 | }; | 31 | }; |
32 | 32 | ||
33 | static int sysv_setattr(struct dentry *dentry, struct iattr *attr) | ||
34 | { | ||
35 | struct inode *inode = dentry->d_inode; | ||
36 | int error; | ||
37 | |||
38 | error = inode_change_ok(inode, attr); | ||
39 | if (error) | ||
40 | return error; | ||
41 | return inode_setattr(inode, attr); | ||
42 | } | ||
43 | |||
33 | const struct inode_operations sysv_file_inode_operations = { | 44 | const struct inode_operations sysv_file_inode_operations = { |
34 | .truncate = sysv_truncate, | 45 | .truncate = sysv_truncate, |
46 | .setattr = sysv_setattr, | ||
35 | .getattr = sysv_getattr, | 47 | .getattr = sysv_getattr, |
36 | }; | 48 | }; |