return ret;
}
-
static int ceph_fsync(struct file *file, struct dentry *dentry, int datasync)
{
struct inode *inode = dentry->d_inode;
dout(10, "fsync on inode %p\n", inode);
ret = write_inode_now(inode, 1);
-
+ if (ret < 0)
+ return ret;
/*
* fixme: also ensure that caps are flushed to mds
*/
- return ret;
+ return 0;
}
-
-
const struct file_operations ceph_file_fops = {
.open = ceph_open,
.release = ceph_release,
int ceph_setattr(struct dentry *dentry, struct iattr *attr)
{
struct inode *inode = dentry->d_inode;
- const unsigned int ia_valid = attr->ia_valid;
+ const unsigned int ia_valid = attr->ia_valid;
int err;
err = inode_change_ok(inode, attr);
dout(10, "setattr: ATTR_FILE ... hrm!\n");
/* chown */
- if (ia_valid & (ATTR_UID|ATTR_GID)) {
+ if (ia_valid & (ATTR_UID|ATTR_GID)) {
err = ceph_setattr_chown(dentry, attr);
if (err)
return err;