From ff46d7b3e0870a70331b069372c36fbc43018c2d Mon Sep 17 00:00:00 2001 From: Adrian Hunter Date: Mon, 21 Jul 2008 15:39:05 +0300 Subject: UBIFS: make ubifs_ro_mode() not inline 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 Signed-off-by: Artem Bityutskiy --- fs/ubifs/misc.h | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'fs/ubifs/misc.h') diff --git a/fs/ubifs/misc.h b/fs/ubifs/misc.h index 4beccfc256d..cd83ffc8101 100644 --- a/fs/ubifs/misc.h +++ b/fs/ubifs/misc.h @@ -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 -- cgit v1.2.3