]> pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
UBIFS: make ubifs_ro_mode() not inline
authorAdrian Hunter <ext-adrian.hunter@nokia.com>
Mon, 21 Jul 2008 12:39:05 +0000 (15:39 +0300)
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Wed, 13 Aug 2008 08:24:26 +0000 (11:24 +0300)
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
fs/ubifs/misc.h
fs/ubifs/ubifs.h

index 3374f91b67091f9516c4909b41889fd9f2a3912e..054363f2b207398ff6110fa74a7333d84d43dbc4 100644 (file)
 #include <linux/crc32.h>
 #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
index 4beccfc256d22d259c6c4599e08f08de68663143..cd83ffc8101caf6e98b5b45cbbb173aed61fb8f2 100644 (file)
@@ -79,20 +79,6 @@ static inline struct ubifs_inode *ubifs_inode(const struct inode *inode)
        return container_of(inode, struct ubifs_inode, vfs_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
index e4f89f2718274b6125365c56e31daee482a967ee..c488d43b63597ca29ae92c9ce629d76ac0c14660 100644 (file)
@@ -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);