I think that we must only call inode_setattr() if yaffs_SetAttributes() succeed.
It seems logical and it's done like this in other filesystems.
diff --git a/fs/yaffs2/yaffs_fs.c b/fs/yaffs2/yaffs_fs.c
--- a/fs/yaffs2/yaffs_fs.c
+++ b/fs/yaffs2/yaffs_fs.c
@@ -1200,7 +1200,8 @@ static int yaffs_setattr(struct dentry *
error = -EPERM;
}
yaffs_GrossUnlock(dev);
- error = inode_setattr(inode,attr);
+ if (!error)
+ error = inode_setattr(inode,attr);
}
return error;
}