From: Artem Bityutskiy <dedekind1@gmail.com>
To: linux-mtd@lists.infradead.org
Cc: Matthieu CASTET <matthieu.castet@parrot.com>,
Adrian Hunter <adrian.hunter@nokia.com>
Subject: [PATCHv2 1/9] UBIFS: switch to RO mode after synchronizing
Date: Sun, 8 Aug 2010 12:57:24 +0300 [thread overview]
Message-ID: <1281261452-9868-2-git-send-email-dedekind1@gmail.com> (raw)
In-Reply-To: <1281261452-9868-1-git-send-email-dedekind1@gmail.com>
From: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
In 'ubifs_garbage_collect()' on error path, we first switch to R/O mode, and
then synchronize write-buffers (to make sure no data are lost). But the GC
write-buffer synchronization will fail, because we are already in R/O mode.
This patch re-orders this and makes sure we first synchronize the write-buffer,
and then switch to R/O mode.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
---
fs/ubifs/gc.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/ubifs/gc.c b/fs/ubifs/gc.c
index 918d158..f89a422 100644
--- a/fs/ubifs/gc.c
+++ b/fs/ubifs/gc.c
@@ -774,8 +774,8 @@ out_unlock:
out:
ubifs_assert(ret < 0);
ubifs_assert(ret != -ENOSPC && ret != -EAGAIN);
- ubifs_ro_mode(c, ret);
ubifs_wbuf_sync_nolock(wbuf);
+ ubifs_ro_mode(c, ret);
mutex_unlock(&wbuf->io_mutex);
ubifs_return_leb(c, lp.lnum);
return ret;
--
1.7.1.1
next prev parent reply other threads:[~2010-08-08 9:57 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-08 9:57 [PATCHv2 0/9] UBIFS: recent patches Artem Bityutskiy
2010-08-08 9:57 ` Artem Bityutskiy [this message]
2010-08-08 9:57 ` [PATCHv2 2/9] UBIFS: do not treat ENOSPC specially Artem Bityutskiy
2010-08-08 9:57 ` [PATCHv2 3/9] UBIFS: fix assertion warning Artem Bityutskiy
2010-08-08 9:57 ` [PATCHv2 4/9] UBIFS: do not look up truncation nodes Artem Bityutskiy
2010-08-08 9:57 ` [PATCHv2 5/9] UBIFS: do not use key type in list_sort Artem Bityutskiy
2010-08-08 9:57 ` [PATCHv2 6/9] UBIFS: improve assertion in node comparison functions Artem Bityutskiy
2010-08-08 9:57 ` [PATCHv2 7/9] UBIFS: do not write rubbish into truncation scanning node Artem Bityutskiy
2010-08-08 11:03 ` Adrian Hunter
2010-08-08 11:08 ` Adrian Hunter
2010-08-08 13:59 ` Artem Bityutskiy
2010-08-22 4:25 ` Artem Bityutskiy
2010-08-08 9:57 ` [PATCHv2 8/9] UBIFS: fix assertion warnings in comparison function Artem Bityutskiy
2010-08-08 9:57 ` [PATCHv2 9/9] UBIFS: introduce list sorting debugging checks Artem Bityutskiy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1281261452-9868-2-git-send-email-dedekind1@gmail.com \
--to=dedekind1@gmail.com \
--cc=adrian.hunter@nokia.com \
--cc=linux-mtd@lists.infradead.org \
--cc=matthieu.castet@parrot.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.