aboutsummaryrefslogtreecommitdiffstats
path: root/fs/udf/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/udf/file.c')
-rw-r--r--fs/udf/file.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/fs/udf/file.c b/fs/udf/file.c
index 94e06d6bddbd..7376032c89ce 100644
--- a/fs/udf/file.c
+++ b/fs/udf/file.c
@@ -228,6 +228,18 @@ const struct file_operations udf_file_operations = {
228 .llseek = generic_file_llseek, 228 .llseek = generic_file_llseek,
229}; 229};
230 230
231static int udf_setattr(struct dentry *dentry, struct iattr *attr)
232{
233 struct inode *inode = dentry->d_inode;
234 int error;
235
236 error = inode_change_ok(inode, attr);
237 if (error)
238 return error;
239 return inode_setattr(inode, attr);
240}
241
231const struct inode_operations udf_file_inode_operations = { 242const struct inode_operations udf_file_inode_operations = {
243 .setattr = udf_setattr,
232 .truncate = udf_truncate, 244 .truncate = udf_truncate,
233}; 245};