diff options
Diffstat (limited to 'fs/ubifs/io.c')
-rw-r--r-- | fs/ubifs/io.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/fs/ubifs/io.c b/fs/ubifs/io.c index 3374f91b6709..054363f2b207 100644 --- a/fs/ubifs/io.c +++ b/fs/ubifs/io.c | |||
@@ -54,6 +54,20 @@ | |||
54 | #include "ubifs.h" | 54 | #include "ubifs.h" |
55 | 55 | ||
56 | /** | 56 | /** |
57 | * ubifs_ro_mode - switch UBIFS to read read-only mode. | ||
58 | * @c: UBIFS file-system description object | ||
59 | * @err: error code which is the reason of switching to R/O mode | ||
60 | */ | ||
61 | void ubifs_ro_mode(struct ubifs_info *c, int err) | ||
62 | { | ||
63 | if (!c->ro_media) { | ||
64 | c->ro_media = 1; | ||
65 | ubifs_warn("switched to read-only mode, error %d", err); | ||
66 | dbg_dump_stack(); | ||
67 | } | ||
68 | } | ||
69 | |||
70 | /** | ||
57 | * ubifs_check_node - check node. | 71 | * ubifs_check_node - check node. |
58 | * @c: UBIFS file-system description object | 72 | * @c: UBIFS file-system description object |
59 | * @buf: node to check | 73 | * @buf: node to check |