X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=fs%2Fubifs%2Fmisc.h;h=87dabf9fe742ea05674ec8cb2bf78f5fe98f510d;hb=ff9bc512f198eb47204f55b24c6fe3d36ed89592;hp=4beccfc256d22d259c6c4599e08f08de68663143;hpb=3988ba0708e98b4bafc9034aa476775520bee708;p=linux-2.6 diff --git a/fs/ubifs/misc.h b/fs/ubifs/misc.h index 4beccfc256..87dabf9fe7 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 @@ -322,7 +308,7 @@ static inline long long ubifs_reported_space(const struct ubifs_info *c, { int divisor, factor; - divisor = UBIFS_MAX_DATA_NODE_SZ + (c->max_idx_node_sz << 1); + divisor = UBIFS_MAX_DATA_NODE_SZ + (c->max_idx_node_sz * 3); factor = UBIFS_MAX_DATA_NODE_SZ - UBIFS_DATA_NODE_SZ; do_div(free, divisor);