aboutsummaryrefslogtreecommitdiffstats
path: root/fs/omfs
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2010-06-04 05:29:59 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2010-08-09 16:47:34 -0400
commitd39aae9ec447dda84d9a2850743a78a535a71c90 (patch)
treee362c3367f093b79482f3034e82b18cd2dc8931a /fs/omfs
parent155130a4f7848b1aac439cab6bda1a175507c71c (diff)
add missing setattr methods
For the new truncate sequence every filesystem that wants to truncate on-disk state needs a seattr method. Convert the remaining filesystems that implement the truncate inode operation to have its own setattr method. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/omfs')
-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 810cff34646..78c9f0c1a2f 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