VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   32 Branches   54 Tags
author: Christoph Hellwig <hch@lst.de> 2010-06-04 11:29:59 +0200 committer: Al Viro <viro@zeniv.linux.org.uk> 2010-08-09 16:47:34 -0400 commit: d39aae9ec447dda84d9a2850743a78a535a71c90 parent: 155130a4f7848b1aac439cab6bda1a175507c71c
Commit Summary:
add missing setattr methods
Diffstat:
1 file changed, 11 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 = {
 	.splice_read = generic_file_splice_read,
 };
 
+static int omfs_setattr(struct dentry *dentry, struct iattr *attr)
+{
+	struct inode *inode = dentry->d_inode;
+	int error;
+
+	error = inode_change_ok(inode, attr);
+	if (error)
+		return error;
+	return inode_setattr(inode, attr);
+}
+
 const struct inode_operations omfs_file_inops = {
+	.setattr = omfs_setattr,
 	.truncate = omfs_truncate
 };