alistair23-linux/fs/btrfs
Dave Young 20b450773d btrfs: mount failure return value fix
I happened to pass swap partition as root partition in cmdline,
then kernel panic and tell me about "Cannot open root device".
It is not correct, in fact it is a fs type mismatch instead of 'no device'.

Eventually I found btrfs mounting failed with -EIO, it should be -EINVAL.
The logic in init/do_mounts.c:
        for (p = fs_names; *p; p += strlen(p)+1) {
                int err = do_mount_root(name, p, flags, root_mount_data);
                switch (err) {
                        case 0:
                                goto out;
                        case -EACCES:
                                flags |= MS_RDONLY;
                                goto retry;
                        case -EINVAL:
                                continue;
                }
		print "Cannot open root device"
		panic
	}
SO fs type after btrfs will have no chance to mount

Here fix the return value as -EINVAL

Signed-off-by: Dave Young <hidave.darkstar@gmail.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2011-01-16 11:30:19 -05:00
..
acl.c btrfs: Mem leak in btrfs_get_acl() 2011-01-16 11:30:19 -05:00
async-thread.c Btrfs: don't walk around with task->state != TASK_RUNNING 2010-05-25 10:34:58 -04:00
async-thread.h
btrfs_inode.h btrfs: Allow to add new compression algorithm 2010-12-22 23:15:45 +08:00
compat.h
compression.c btrfs: Extract duplicate decompress code 2010-12-22 23:15:50 +08:00
compression.h btrfs: Extract duplicate decompress code 2010-12-22 23:15:50 +08:00
ctree.c Btrfs: cleanup warnings from gcc 4.6 (nonbugs) 2010-10-29 15:14:37 -04:00
ctree.h btrfs: fix wrong free space information of btrfs 2011-01-16 11:30:19 -05:00
delayed-ref.c Btrfs: Integrate metadata reservation with start_transaction 2010-05-25 10:34:50 -04:00
delayed-ref.h Btrfs: Integrate metadata reservation with start_transaction 2010-05-25 10:34:50 -04:00
dir-item.c Btrfs: Fix variables set but not read (bugs found by gcc 4.6) 2010-10-29 15:14:31 -04:00
disk-io.c btrfs: mount failure return value fix 2011-01-16 11:30:19 -05:00
disk-io.h Btrfs: use async helpers for DIO write checksumming 2010-05-25 10:34:58 -04:00
export.c Btrfs: handle NFS lookups properly 2010-11-21 22:26:08 -05:00
export.h
extent-tree.c btrfs: fix wrong free space information of btrfs 2011-01-16 11:30:19 -05:00
extent_io.c btrfs: Allow to add new compression algorithm 2010-12-22 23:15:45 +08:00
extent_io.h btrfs: Allow to add new compression algorithm 2010-12-22 23:15:45 +08:00
extent_map.c btrfs: Allow to add new compression algorithm 2010-12-22 23:15:45 +08:00
extent_map.h btrfs: Allow to add new compression algorithm 2010-12-22 23:15:45 +08:00
file-item.c Btrfs: add basic DIO read/write support 2010-05-25 10:34:57 -04:00
file.c btrfs: Allow to add new compression algorithm 2010-12-22 23:15:45 +08:00
free-space-cache.c Btrfs: deal with space cache errors better 2010-12-09 13:57:12 -05:00
free-space-cache.h Btrfs: load free space cache if it exists 2010-10-29 09:26:35 -04:00
hash.h
inode-item.c Btrfs: Integrate metadata reservation with start_transaction 2010-05-25 10:34:50 -04:00
inode-map.c
inode.c Merge branch 'lzo-support' of git://repo.or.cz/linux-btrfs-devel into btrfs-38 2011-01-16 11:25:54 -05:00
ioctl.c Merge branch 'lzo-support' of git://repo.or.cz/linux-btrfs-devel into btrfs-38 2011-01-16 11:25:54 -05:00
ioctl.h Merge branch 'lzo-support' of git://repo.or.cz/linux-btrfs-devel into btrfs-38 2011-01-16 11:25:54 -05:00
Kconfig btrfs: Add lzo compression support 2010-12-22 23:15:47 +08:00
locking.c
locking.h
lzo.c btrfs: Extract duplicate decompress code 2010-12-22 23:15:50 +08:00
Makefile btrfs: Add lzo compression support 2010-12-22 23:15:47 +08:00
ordered-data.c btrfs: Allow to add new compression algorithm 2010-12-22 23:15:45 +08:00
ordered-data.h btrfs: Allow to add new compression algorithm 2010-12-22 23:15:45 +08:00
orphan.c Btrfs: fixup return code for btrfs_del_orphan_item 2010-12-09 13:57:15 -05:00
print-tree.c
print-tree.h
ref-cache.c
ref-cache.h
relocation.c Btrfs: Fix variables set but not read (bugs found by gcc 4.6) 2010-10-29 15:14:31 -04:00
root-tree.c Btrfs: cleanup warnings from gcc 4.6 (nonbugs) 2010-10-29 15:14:37 -04:00
struct-funcs.c
super.c btrfs: fix wrong free space information of btrfs 2011-01-16 11:30:19 -05:00
sysfs.c
transaction.c Btrfs: Add readonly snapshots support 2010-12-23 08:49:17 +08:00
transaction.h Btrfs: Add readonly snapshots support 2010-12-23 08:49:17 +08:00
tree-defrag.c Btrfs: cleanup warnings from gcc 4.6 (nonbugs) 2010-10-29 15:14:37 -04:00
tree-log.c Btrfs: use dget_parent where we can UPDATED 2010-11-21 22:26:09 -05:00
tree-log.h Btrfs: Metadata ENOSPC handling for tree log 2010-05-25 10:34:53 -04:00
version.h
version.sh
volumes.c btrfs: mount failure return value fix 2011-01-16 11:30:19 -05:00
volumes.h btrfs: fix wrong free space information of btrfs 2011-01-16 11:30:19 -05:00
xattr.c Btrfs: Add readonly snapshots support 2010-12-23 08:49:17 +08:00
xattr.h btrfs: constify xattr_handler 2010-05-21 18:31:18 -04:00
zlib.c btrfs: Extract duplicate decompress code 2010-12-22 23:15:50 +08:00