aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/super.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/super.c b/fs/super.c
index 938119ab8dcb..3479ca6f005f 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -773,7 +773,16 @@ int get_sb_bdev(struct file_system_type *fs_type,
773 goto error_bdev; 773 goto error_bdev;
774 } 774 }
775 775
776 /*
777 * s_umount nests inside bd_mutex during
778 * __invalidate_device(). close_bdev_exclusive()
779 * acquires bd_mutex and can't be called under
780 * s_umount. Drop s_umount temporarily. This is safe
781 * as we're holding an active reference.
782 */
783 up_write(&s->s_umount);
776 close_bdev_exclusive(bdev, mode); 784 close_bdev_exclusive(bdev, mode);
785 down_write(&s->s_umount);
777 } else { 786 } else {
778 char b[BDEVNAME_SIZE]; 787 char b[BDEVNAME_SIZE];
779 788