From: Artem Bityutskiy <dedekind@infradead.org>
To: linux-kernel@vger.kernel.org
Cc: Adrian Hunter <ext-adrian.hunter@nokia.com>,
Zoltan Sogor <weth@inf.u-szeged.hu>,
Christoph Hellwig <hch@lst.de>
Subject: [PATCH] UBIFS: make ubifs_ro_mode() not inline
Date: Wed, 13 Aug 2008 13:17:37 +0300 [thread overview]
Message-ID: <1218622675-28853-9-git-send-email-dedekind@infradead.org> (raw)
In-Reply-To: <1218622675-28853-1-git-send-email-dedekind@infradead.org>
From: Adrian Hunter <ext-adrian.hunter@nokia.com>
We use ubifs_ro_mode() quite a lot, and not in fast-path, so
there is no reason to blow the code up by having it inlined.
Also, we usually want R/O mode change to be seen to other
CPUs as soon as possible, so when we make this a function
call, we will automatically have a memory barrier.
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
---
fs/ubifs/io.c | 14 ++++++++++++++
fs/ubifs/misc.h | 14 --------------
fs/ubifs/ubifs.h | 1 +
3 files changed, 15 insertions(+), 14 deletions(-)
diff --git a/fs/ubifs/io.c b/fs/ubifs/io.c
index 3374f91..054363f 100644
--- a/fs/ubifs/io.c
+++ b/fs/ubifs/io.c
@@ -54,6 +54,20 @@
#include "ubifs.h"
/**
+ * ubifs_ro_mode - switch UBIFS to read read-only mode.
+ * @c: UBIFS file-system description object
+ * @err: error code which is the reason of switching to R/O mode
+ */
+void ubifs_ro_mode(struct ubifs_info *c, int err)
+{
+ if (!c->ro_media) {
+ c->ro_media = 1;
+ ubifs_warn("switched to read-only mode, error %d", err);
+ dbg_dump_stack();
+ }
+}
+
+/**
* ubifs_check_node - check node.
* @c: UBIFS file-system description object
* @buf: node to check
diff --git a/fs/ubifs/misc.h b/fs/ubifs/misc.h
index 4beccfc..cd83ffc 100644
--- a/fs/ubifs/misc.h
+++ b/fs/ubifs/misc.h
@@ -80,20 +80,6 @@ static inline struct ubifs_inode *ubifs_inode(const struct inode *inode)
}
/**
- * ubifs_ro_mode - switch UBIFS to read read-only mode.
- * @c: UBIFS file-system description object
- * @err: error code which is the reason of switching to R/O mode
- */
-static inline void ubifs_ro_mode(struct ubifs_info *c, int err)
-{
- if (!c->ro_media) {
- c->ro_media = 1;
- ubifs_warn("switched to read-only mode, error %d", err);
- dbg_dump_stack();
- }
-}
-
-/**
* ubifs_compr_present - check if compressor was compiled in.
* @compr_type: compressor type to check
*
diff --git a/fs/ubifs/ubifs.h b/fs/ubifs/ubifs.h
index e4f89f2..c488d43 100644
--- a/fs/ubifs/ubifs.h
+++ b/fs/ubifs/ubifs.h
@@ -1346,6 +1346,7 @@ extern struct backing_dev_info ubifs_backing_dev_info;
extern struct ubifs_compressor *ubifs_compressors[UBIFS_COMPR_TYPES_CNT];
/* io.c */
+void ubifs_ro_mode(struct ubifs_info *c, int err);
int ubifs_wbuf_write_nolock(struct ubifs_wbuf *wbuf, void *buf, int len);
int ubifs_wbuf_seek_nolock(struct ubifs_wbuf *wbuf, int lnum, int offs,
int dtype);
--
1.5.4.1
next prev parent reply other threads:[~2008-08-13 8:40 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-13 10:17 UBIFS updates for 2.6.27 Artem Bityutskiy
2008-08-13 10:17 ` [PATCH] Documentation: fix typo in ubifs.txt Artem Bityutskiy
2008-08-13 10:17 ` [PATCH] UBIFS: print volume name as well Artem Bityutskiy
2008-08-13 10:17 ` [PATCH] UBIFS: fix budgeting calculations Artem Bityutskiy
2008-08-13 10:17 ` [PATCH] UBIFS: improve debugging Artem Bityutskiy
2008-08-13 10:17 ` [PATCH] UBIFS: free budget in delete_inode as well Artem Bityutskiy
2008-08-13 10:17 ` [PATCH] UBIFS: fix error return in failure mode Artem Bityutskiy
2008-08-13 10:17 ` [PATCH] UBIFS: ensure UBIFS switches to read-only on error Artem Bityutskiy
2008-08-13 10:17 ` Artem Bityutskiy [this message]
2008-08-13 10:17 ` [PATCH] UBIFS: do not write orphans back Artem Bityutskiy
2008-08-13 10:17 ` [PATCH] UBIFS: remove unneeded function parameter Artem Bityutskiy
2008-08-13 10:17 ` [PATCH] UBIFS: remove another " Artem Bityutskiy
2008-08-13 10:17 ` [PATCH] UBIFS: increment commit number earlier Artem Bityutskiy
2008-08-13 10:17 ` [PATCH] UBIFS: optimize deletions Artem Bityutskiy
2008-08-13 10:17 ` [PATCH] UBIFS: do not union creat_sqnum and del_cmtno Artem Bityutskiy
2008-08-13 10:17 ` [PATCH] UBIFS: fix typos in comments Artem Bityutskiy
2008-08-13 10:17 ` [PATCH] UBIFS: correct orphan deletion order Artem Bityutskiy
2008-08-13 10:17 ` [PATCH] UBIFS: improve budgeting checks Artem Bityutskiy
2008-08-13 10:17 ` [PATCH] UBIFS: align inode data to eight Artem Bityutskiy
2008-08-13 10:17 ` [PATCH] UBIFS: print pid in dump function Artem Bityutskiy
2008-08-13 10:17 ` [PATCH] UBIFS: reserve more space for index Artem Bityutskiy
2008-08-13 10:17 ` [PATCH] UBIFS: minor tweaks in commit Artem Bityutskiy
2008-08-13 10:17 ` [PATCH] UBIFS: support splice_write Artem Bityutskiy
2008-08-13 10:17 ` [PATCH] UBIFS: correct spelling of "thrice" Artem Bityutskiy
2008-08-13 10:17 ` [PATCH] UBIFS: always set i_generation to 0 Artem Bityutskiy
2008-08-13 10:17 ` [PATCH] UBIFS: improve arguments checking in debugging messages Artem Bityutskiy
2008-08-13 10:17 ` [PATCH] UBIFS: fix budgeting request alignment in xattr code Artem Bityutskiy
2008-08-14 19:27 ` UBIFS updates for 2.6.27 Christoph Hellwig
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=1218622675-28853-9-git-send-email-dedekind@infradead.org \
--to=dedekind@infradead.org \
--cc=ext-adrian.hunter@nokia.com \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=weth@inf.u-szeged.hu \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®