Commit 93d5581e20600593ec3236921b6620225fb76034

Authored by Alan Cox
Committed by Linus Torvalds
1 parent 26a2e20f4a

devpts: unregister the file system on error

Closes-bug: http://bugzilla.kernel.org/show_bug.cgi?id=13429

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Showing 1 changed file with 3 additions and 1 deletions Side-by-side Diff

... ... @@ -557,8 +557,10 @@
557 557 int err = register_filesystem(&devpts_fs_type);
558 558 if (!err) {
559 559 devpts_mnt = kern_mount(&devpts_fs_type);
560   - if (IS_ERR(devpts_mnt))
  560 + if (IS_ERR(devpts_mnt)) {
561 561 err = PTR_ERR(devpts_mnt);
  562 + unregister_filesystem(&devpts_fs_type);
  563 + }
562 564 }
563 565 return err;
564 566 }