]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
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)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 13 Aug 2010 20:20:10 +0000 (13:20 -0700)
commit 014e4ac4f7d9c981750491fa40ea35efadc9ed49 upstream.

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>
Acked-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/btrfs/file.c

index ae96fdae1f7de9e4c2f91035f6d26497a1393d7f..413a30dafcdacaf62419f89c4be10b64c66926a1 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 = {