aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ubifs/super.c
diff options
context:
space:
mode:
authorAlessio Igor Bogani <abogani@texware.it>2009-05-12 09:10:54 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2009-06-11 21:36:11 -0400
commit337eb00a2c3a421999c39c94ce7e33545ee8baa7 (patch)
treed9b780d095b638b1d8fa23841ff70347cf5daa08 /fs/ubifs/super.c
parent4195f73d1329e49727bcceb028e58cb38376c2b0 (diff)
Push BKL down into ->remount_fs()
[xfs, btrfs, capifs, shmem don't need BKL, exempt] Signed-off-by: Alessio Igor Bogani <abogani@texware.it> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/ubifs/super.c')
-rw-r--r--fs/ubifs/super.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c
index 522c3fd7eb3c..3589eab02a2f 100644
--- a/fs/ubifs/super.c
+++ b/fs/ubifs/super.c
@@ -36,6 +36,7 @@
36#include <linux/mount.h> 36#include <linux/mount.h>
37#include <linux/math64.h> 37#include <linux/math64.h>
38#include <linux/writeback.h> 38#include <linux/writeback.h>
39#include <linux/smp_lock.h>
39#include "ubifs.h" 40#include "ubifs.h"
40 41
41/* 42/*
@@ -1770,17 +1771,22 @@ static int ubifs_remount_fs(struct super_block *sb, int *flags, char *data)
1770 return err; 1771 return err;
1771 } 1772 }
1772 1773
1774 lock_kernel();
1773 if ((sb->s_flags & MS_RDONLY) && !(*flags & MS_RDONLY)) { 1775 if ((sb->s_flags & MS_RDONLY) && !(*flags & MS_RDONLY)) {
1774 if (c->ro_media) { 1776 if (c->ro_media) {
1775 ubifs_msg("cannot re-mount due to prior errors"); 1777 ubifs_msg("cannot re-mount due to prior errors");
1778 unlock_kernel();
1776 return -EROFS; 1779 return -EROFS;
1777 } 1780 }
1778 err = ubifs_remount_rw(c); 1781 err = ubifs_remount_rw(c);
1779 if (err) 1782 if (err) {
1783 unlock_kernel();
1780 return err; 1784 return err;
1785 }
1781 } else if (!(sb->s_flags & MS_RDONLY) && (*flags & MS_RDONLY)) { 1786 } else if (!(sb->s_flags & MS_RDONLY) && (*flags & MS_RDONLY)) {
1782 if (c->ro_media) { 1787 if (c->ro_media) {
1783 ubifs_msg("cannot re-mount due to prior errors"); 1788 ubifs_msg("cannot re-mount due to prior errors");
1789 unlock_kernel();
1784 return -EROFS; 1790 return -EROFS;
1785 } 1791 }
1786 ubifs_remount_ro(c); 1792 ubifs_remount_ro(c);
@@ -1795,6 +1801,7 @@ static int ubifs_remount_fs(struct super_block *sb, int *flags, char *data)
1795 } 1801 }
1796 1802
1797 ubifs_assert(c->lst.taken_empty_lebs > 0); 1803 ubifs_assert(c->lst.taken_empty_lebs > 0);
1804 unlock_kernel();
1798 return 0; 1805 return 0;
1799} 1806}
1800 1807