summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-04-04 08:41:43 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2013-04-04 08:41:43 -0700
commit22d1e6f4c509eea39fd9232a01697e1cf08ff8a8 (patch)
tree617d8a3f438dc47e2fe79d244ea4af22281afaf6 /fs
parent014642cb0a08d1b12c6089c48c7ba6002a0f6811 (diff)
parent67e753ca41782913d805ff4a8a2b0f60b26b7915 (diff)
downloadlinux-stable-22d1e6f4c509eea39fd9232a01697e1cf08ff8a8.tar.gz
linux-stable-22d1e6f4c509eea39fd9232a01697e1cf08ff8a8.tar.bz2
linux-stable-22d1e6f4c509eea39fd9232a01697e1cf08ff8a8.zip
Merge tag 'upstream-3.9-rc6' of git://git.infradead.org/linux-ubifs
Pull UBIFS fix from Artem Bityutskiy: "Make the space fixup feature work in the case when the file-system is first mounted R/O and then remounted R/W." * tag 'upstream-3.9-rc6' of git://git.infradead.org/linux-ubifs: UBIFS: make space fixup work in the remount case
Diffstat (limited to 'fs')
-rw-r--r--fs/ubifs/super.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c
index ac838b844936..f21acf0ef01f 100644
--- a/fs/ubifs/super.c
+++ b/fs/ubifs/super.c
@@ -1568,6 +1568,12 @@ static int ubifs_remount_rw(struct ubifs_info *c)
c->remounting_rw = 1;
c->ro_mount = 0;
+ if (c->space_fixup) {
+ err = ubifs_fixup_free_space(c);
+ if (err)
+ return err;
+ }
+
err = check_free_space(c);
if (err)
goto out;
@@ -1684,12 +1690,6 @@ static int ubifs_remount_rw(struct ubifs_info *c)
err = dbg_check_space_info(c);
}
- if (c->space_fixup) {
- err = ubifs_fixup_free_space(c);
- if (err)
- goto out;
- }
-
mutex_unlock(&c->umount_mutex);
return err;