Btrfs: make error return negative in btrfs_sync_file()
authorRoel Kluin <roel.kluin@gmail.com>
Fri, 29 Jan 2010 10:42:11 +0000 (10:42 +0000)
committerChris Mason <chris.mason@oracle.com>
Thu, 4 Feb 2010 16:31:44 +0000 (11:31 -0500)
It appears the error return should be negative

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/file.c

index ae96fda..413a30d 100644 (file)
@@ -1133,7 +1133,7 @@ int btrfs_sync_file(struct file *file, struct dentry *dentry, int datasync)
        }
        mutex_lock(&dentry->d_inode->i_mutex);
 out:
-       return ret > 0 ? EIO : ret;
+       return ret > 0 ? -EIO : ret;
 }
 
 static const struct vm_operations_struct btrfs_file_vm_ops = {