projects/linux·commit 22d1e6f4

Merge tag 'upstream-3.9-rc6' of git://git.infradead.org/linux-ubifs

22d1e6f4 · Linus Torvalds <[email protected]> · 2013-04-04 08:41:43 -07:00

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
Commit
22d1e6f4c509eea39fd9232a01697e1cf08ff8a8
Parents
014642cb · 67e753ca

Merge commit. Changes below are compared with the first parent: 014642cb.

Changes

1 files changed · +6 −6

FileStatusAddDelContent
fs/ubifs/super.cmodified+6−6View file

fs/ubifs/super.c

View file
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c
index ac838b8..f21acf0 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;