diff options
-rw-r--r-- | fs/super.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/super.c b/fs/super.c index 928c20f47af9..b61372354f2b 100644 --- a/fs/super.c +++ b/fs/super.c | |||
@@ -842,7 +842,7 @@ int get_anon_bdev(dev_t *p) | |||
842 | else if (error) | 842 | else if (error) |
843 | return -EAGAIN; | 843 | return -EAGAIN; |
844 | 844 | ||
845 | if (dev == (1 << MINORBITS)) { | 845 | if (dev >= (1 << MINORBITS)) { |
846 | spin_lock(&unnamed_dev_lock); | 846 | spin_lock(&unnamed_dev_lock); |
847 | ida_remove(&unnamed_dev_ida, dev); | 847 | ida_remove(&unnamed_dev_ida, dev); |
848 | if (unnamed_dev_start > dev) | 848 | if (unnamed_dev_start > dev) |