Fix btrfs_fill_super to return -EINVAL when no FS found

Signed-off-by: Chris Mason <chris.mason@oracle.com>
This commit is contained in:
Yan
2008-04-01 11:21:34 -04:00
committed by Chris Mason
parent 63b10fc487
commit e58ca0203d
3 changed files with 4 additions and 5 deletions

View File

@@ -237,7 +237,7 @@ int btrfs_scan_one_device(const char *path, int flags, void *holder,
if (strncmp((char *)(&disk_super->magic), BTRFS_MAGIC,
sizeof(disk_super->magic))) {
printk("no btrfs found on %s\n", path);
ret = -ENOENT;
ret = -EINVAL;
goto error_brelse;
}
devid = le64_to_cpu(disk_super->dev_item.devid);