* [PATCH] Btrfs: make error return negative in btrfs_sync_file()
@ 2010-01-29 10:42 Roel Kluin
0 siblings, 0 replies; only message in thread
From: Roel Kluin @ 2010-01-29 10:42 UTC (permalink / raw)
To: Chris Mason, linux-btrfs, Andrew Morton, LKML
It appears the error return should be negative
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
But I fail to see how ret can be positive, unless maybe when we already
did a BUG()?
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
index c020335..9d08096 100644
--- a/fs/btrfs/file.c
+++ b/fs/btrfs/file.c
@@ -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 = {
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2010-01-29 10:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-29 10:42 [PATCH] Btrfs: make error return negative in btrfs_sync_file() Roel Kluin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox