summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/super.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2020-04-28 17:10:27 +0200
committerDavid Sterba <dsterba@suse.com>2020-05-25 11:25:28 +0200
commitd54f814434c5f87356d35bc377f43ef8d0556f15 (patch)
tree30dbc91a3150ebd93977844bee8cf8c01d4f4ebf /fs/btrfs/super.c
parent7f551d969037cc128eca60688d9c5a300d84e665 (diff)
downloadlinux-d54f814434c5f87356d35bc377f43ef8d0556f15.tar.bz2
btrfs: sort error decoder entries
Add the raw errnos and sort them accordingly. Reviewed-by: Anand Jain <anand.jain@oracle.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/super.c')
-rw-r--r--fs/btrfs/super.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index 7932d8d07cff..9e5d723a0d99 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -72,23 +72,23 @@ const char * __attribute_const__ btrfs_decode_error(int errno)
char *errstr = "unknown";
switch (errno) {
- case -EIO:
+ case -ENOENT: /* -2 */
+ errstr = "No such entry";
+ break;
+ case -EIO: /* -5 */
errstr = "IO failure";
break;
- case -ENOMEM:
+ case -ENOMEM: /* -12*/
errstr = "Out of memory";
break;
- case -EROFS:
- errstr = "Readonly filesystem";
- break;
- case -EEXIST:
+ case -EEXIST: /* -17 */
errstr = "Object already exists";
break;
- case -ENOSPC:
+ case -ENOSPC: /* -28 */
errstr = "No space left";
break;
- case -ENOENT:
- errstr = "No such entry";
+ case -EROFS: /* -30 */
+ errstr = "Readonly filesystem";
break;
}