Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 119644
b: refs/heads/master
c: 0ecb952
h: refs/heads/master
v: v3
  • Loading branch information
Harvey Harrison authored and Artem Bityutskiy committed Nov 6, 2008
1 parent dfefd2d commit 9444018
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 069782a1ee55105220e5ae2db448495dac267cb1
refs/heads/master: 0ecb9529a4d47825778e7b0d226eb36019252a9d
4 changes: 2 additions & 2 deletions trunk/fs/ubifs/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -364,8 +364,8 @@ void dbg_dump_node(const struct ubifs_info *c, const void *node)
le32_to_cpu(mst->ihead_lnum));
printk(KERN_DEBUG "\tihead_offs %u\n",
le32_to_cpu(mst->ihead_offs));
printk(KERN_DEBUG "\tindex_size %u\n",
le32_to_cpu(mst->index_size));
printk(KERN_DEBUG "\tindex_size %llu\n",
(unsigned long long)le64_to_cpu(mst->index_size));
printk(KERN_DEBUG "\tlpt_lnum %u\n",
le32_to_cpu(mst->lpt_lnum));
printk(KERN_DEBUG "\tlpt_offs %u\n",
Expand Down
3 changes: 2 additions & 1 deletion trunk/fs/ubifs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,8 @@ static int ubifs_readdir(struct file *file, void *dirent, filldir_t filldir)
dbg_gen("feed '%s', ino %llu, new f_pos %#x",
dent->name, (unsigned long long)le64_to_cpu(dent->inum),
key_hash_flash(c, &dent->key));
ubifs_assert(dent->ch.sqnum > ubifs_inode(dir)->creat_sqnum);
ubifs_assert(le64_to_cpu(dent->ch.sqnum) >
ubifs_inode(dir)->creat_sqnum);

nm.len = le16_to_cpu(dent->nlen);
over = filldir(dirent, dent->name, nm.len, file->f_pos,
Expand Down
4 changes: 2 additions & 2 deletions trunk/fs/ubifs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ static int read_block(struct inode *inode, void *addr, unsigned int block,
return err;
}

ubifs_assert(dn->ch.sqnum > ubifs_inode(inode)->creat_sqnum);
ubifs_assert(le64_to_cpu(dn->ch.sqnum) > ubifs_inode(inode)->creat_sqnum);

len = le32_to_cpu(dn->size);
if (len <= 0 || len > UBIFS_BLOCK_SIZE)
Expand Down Expand Up @@ -626,7 +626,7 @@ static int populate_page(struct ubifs_info *c, struct page *page,

dn = bu->buf + (bu->zbranch[nn].offs - offs);

ubifs_assert(dn->ch.sqnum >
ubifs_assert(le64_to_cpu(dn->ch.sqnum) >
ubifs_inode(inode)->creat_sqnum);

len = le32_to_cpu(dn->size);
Expand Down
4 changes: 2 additions & 2 deletions trunk/fs/ubifs/key.h
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ static inline int key_type_flash(const struct ubifs_info *c, const void *k)
{
const union ubifs_key *key = k;

return le32_to_cpu(key->u32[1]) >> UBIFS_S_KEY_BLOCK_BITS;
return le32_to_cpu(key->j32[1]) >> UBIFS_S_KEY_BLOCK_BITS;
}

/**
Expand Down Expand Up @@ -416,7 +416,7 @@ static inline unsigned int key_block_flash(const struct ubifs_info *c,
{
const union ubifs_key *key = k;

return le32_to_cpu(key->u32[1]) & UBIFS_S_KEY_BLOCK_MASK;
return le32_to_cpu(key->j32[1]) & UBIFS_S_KEY_BLOCK_MASK;
}

/**
Expand Down
4 changes: 2 additions & 2 deletions trunk/fs/ubifs/recovery.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,12 +168,12 @@ static int write_rcvrd_mst_node(struct ubifs_info *c,
struct ubifs_mst_node *mst)
{
int err = 0, lnum = UBIFS_MST_LNUM, sz = c->mst_node_alsz;
uint32_t save_flags;
__le32 save_flags;

dbg_rcvry("recovery");

save_flags = mst->flags;
mst->flags = cpu_to_le32(le32_to_cpu(mst->flags) | UBIFS_MST_RCVRY);
mst->flags |= cpu_to_le32(UBIFS_MST_RCVRY);

ubifs_prepare_node(c, mst, UBIFS_MST_NODE_SZ, 1);
err = ubi_leb_change(c->ubi, lnum, mst, sz, UBI_SHORTTERM);
Expand Down
9 changes: 5 additions & 4 deletions trunk/fs/ubifs/sb.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ static int create_default_filesystem(struct ubifs_info *c)
int lpt_lebs, lpt_first, orph_lebs, big_lpt, ino_waste, sup_flags = 0;
int min_leb_cnt = UBIFS_MIN_LEB_CNT;
uint64_t tmp64, main_bytes;
__le64 tmp_le64;

/* Some functions called from here depend on the @c->key_len filed */
c->key_len = UBIFS_SK_LEN;
Expand Down Expand Up @@ -295,10 +296,10 @@ static int create_default_filesystem(struct ubifs_info *c)
ino->ch.node_type = UBIFS_INO_NODE;
ino->creat_sqnum = cpu_to_le64(++c->max_sqnum);
ino->nlink = cpu_to_le32(2);
tmp = cpu_to_le64(CURRENT_TIME_SEC.tv_sec);
ino->atime_sec = tmp;
ino->ctime_sec = tmp;
ino->mtime_sec = tmp;
tmp_le64 = cpu_to_le64(CURRENT_TIME_SEC.tv_sec);
ino->atime_sec = tmp_le64;
ino->ctime_sec = tmp_le64;
ino->mtime_sec = tmp_le64;
ino->atime_nsec = 0;
ino->ctime_nsec = 0;
ino->mtime_nsec = 0;
Expand Down

0 comments on commit 9444018

Please sign in to comment.