aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ubifs/misc.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ubifs/misc.h')
-rw-r--r--fs/ubifs/misc.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/ubifs/misc.h b/fs/ubifs/misc.h
index 5d476ba184e6..c3de04dc952a 100644
--- a/fs/ubifs/misc.h
+++ b/fs/ubifs/misc.h
@@ -132,7 +132,7 @@ static inline int ubifs_leb_unmap(const struct ubifs_info *c, int lnum)
132{ 132{
133 int err; 133 int err;
134 134
135 ubifs_assert(!c->ro_media); 135 ubifs_assert(!c->ro_media && !c->ro_mount);
136 if (c->ro_error) 136 if (c->ro_error)
137 return -EROFS; 137 return -EROFS;
138 err = ubi_leb_unmap(c->ubi, lnum); 138 err = ubi_leb_unmap(c->ubi, lnum);
@@ -160,7 +160,7 @@ static inline int ubifs_leb_write(const struct ubifs_info *c, int lnum,
160{ 160{
161 int err; 161 int err;
162 162
163 ubifs_assert(!c->ro_media); 163 ubifs_assert(!c->ro_media && !c->ro_mount);
164 if (c->ro_error) 164 if (c->ro_error)
165 return -EROFS; 165 return -EROFS;
166 err = ubi_leb_write(c->ubi, lnum, buf, offs, len, dtype); 166 err = ubi_leb_write(c->ubi, lnum, buf, offs, len, dtype);
@@ -188,7 +188,7 @@ static inline int ubifs_leb_change(const struct ubifs_info *c, int lnum,
188{ 188{
189 int err; 189 int err;
190 190
191 ubifs_assert(!c->ro_media); 191 ubifs_assert(!c->ro_media && !c->ro_mount);
192 if (c->ro_error) 192 if (c->ro_error)
193 return -EROFS; 193 return -EROFS;
194 err = ubi_leb_change(c->ubi, lnum, buf, len, dtype); 194 err = ubi_leb_change(c->ubi, lnum, buf, len, dtype);