]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
kclient: fsync returns 0 (fixes final vi issue)
authorSage Weil <sage@newdream.net>
Thu, 17 Apr 2008 21:54:24 +0000 (14:54 -0700)
committerSage Weil <sage@newdream.net>
Thu, 17 Apr 2008 22:18:48 +0000 (15:18 -0700)
src/kernel/file.c
src/kernel/inode.c

index 884c832d531144f7420a70e5b6d9a5c3e6a85aa7..3d942bb594666d9b913ee01f20906baef8c5bfa0 100644 (file)
@@ -326,7 +326,6 @@ out:
        return ret;
 }
 
-
 static int ceph_fsync(struct file *file, struct dentry *dentry, int datasync)
 {
        struct inode *inode = dentry->d_inode;
@@ -334,16 +333,15 @@ static int ceph_fsync(struct file *file, struct dentry *dentry, int datasync)
 
        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,
index d7be1e7fcb33cc02ed9889f73cc06a049241c712..583ea439193d87e2f9ac163e1d124ac5ed38b742 100644 (file)
@@ -1414,7 +1414,7 @@ static int ceph_setattr_size(struct dentry *dentry, struct iattr *attr)
 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);
@@ -1444,7 +1444,7 @@ int ceph_setattr(struct dentry *dentry, struct iattr *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;