Skip to content

Commit 51eaaa6

Browse files
committed
Merge branch 'linux-next' of git://git.infradead.org/ubifs-2.6
* 'linux-next' of git://git.infradead.org/ubifs-2.6: UBIFS: pre-allocate bulk-read buffer UBIFS: do not allocate too much UBIFS: do not print scary memory allocation warnings UBIFS: allow for gaps when dirtying the LPT UBIFS: fix compilation warnings MAINTAINERS: change UBI/UBIFS git tree URLs UBIFS: endian handling fixes and annotations UBIFS: remove printk
2 parents b7d6266 + 3477d20 commit 51eaaa6

15 files changed

Lines changed: 223 additions & 111 deletions

File tree

‎MAINTAINERS‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4236,7 +4236,7 @@ M: dedekind@infradead.org
42364236
P: Adrian Hunter
42374237
M: ext-adrian.hunter@nokia.com
42384238
L: linux-mtd@lists.infradead.org
4239-
T: git git://git.infradead.org/~dedekind/ubifs-2.6.git
4239+
T: git git://git.infradead.org/ubifs-2.6.git
42404240
W: http://www.linux-mtd.infradead.org/doc/ubifs.html
42414241
S: Maintained
42424242

@@ -4290,7 +4290,7 @@ P: Artem Bityutskiy
42904290
M: dedekind@infradead.org
42914291
W: http://www.linux-mtd.infradead.org/
42924292
L: linux-mtd@lists.infradead.org
4293-
T: git git://git.infradead.org/~dedekind/ubi-2.6.git
4293+
T: git git://git.infradead.org/ubi-2.6.git
42944294
S: Maintained
42954295

42964296
USB ACM DRIVER

‎fs/ubifs/commit.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,8 @@ int ubifs_bg_thread(void *info)
234234
int err;
235235
struct ubifs_info *c = info;
236236

237-
ubifs_msg("background thread \"%s\" started, PID %d",
238-
c->bgt_name, current->pid);
237+
dbg_msg("background thread \"%s\" started, PID %d",
238+
c->bgt_name, current->pid);
239239
set_freezable();
240240

241241
while (1) {

‎fs/ubifs/debug.c‎

Lines changed: 39 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -101,21 +101,24 @@ static void sprintf_key(const struct ubifs_info *c, const union ubifs_key *key,
101101
if (c->key_fmt == UBIFS_SIMPLE_KEY_FMT) {
102102
switch (type) {
103103
case UBIFS_INO_KEY:
104-
sprintf(p, "(%lu, %s)", key_inum(c, key),
104+
sprintf(p, "(%lu, %s)", (unsigned long)key_inum(c, key),
105105
get_key_type(type));
106106
break;
107107
case UBIFS_DENT_KEY:
108108
case UBIFS_XENT_KEY:
109-
sprintf(p, "(%lu, %s, %#08x)", key_inum(c, key),
109+
sprintf(p, "(%lu, %s, %#08x)",
110+
(unsigned long)key_inum(c, key),
110111
get_key_type(type), key_hash(c, key));
111112
break;
112113
case UBIFS_DATA_KEY:
113-
sprintf(p, "(%lu, %s, %u)", key_inum(c, key),
114+
sprintf(p, "(%lu, %s, %u)",
115+
(unsigned long)key_inum(c, key),
114116
get_key_type(type), key_block(c, key));
115117
break;
116118
case UBIFS_TRUN_KEY:
117119
sprintf(p, "(%lu, %s)",
118-
key_inum(c, key), get_key_type(type));
120+
(unsigned long)key_inum(c, key),
121+
get_key_type(type));
119122
break;
120123
default:
121124
sprintf(p, "(bad key type: %#08x, %#08x)",
@@ -364,8 +367,8 @@ void dbg_dump_node(const struct ubifs_info *c, const void *node)
364367
le32_to_cpu(mst->ihead_lnum));
365368
printk(KERN_DEBUG "\tihead_offs %u\n",
366369
le32_to_cpu(mst->ihead_offs));
367-
printk(KERN_DEBUG "\tindex_size %u\n",
368-
le32_to_cpu(mst->index_size));
370+
printk(KERN_DEBUG "\tindex_size %llu\n",
371+
(unsigned long long)le64_to_cpu(mst->index_size));
369372
printk(KERN_DEBUG "\tlpt_lnum %u\n",
370373
le32_to_cpu(mst->lpt_lnum));
371374
printk(KERN_DEBUG "\tlpt_offs %u\n",
@@ -1589,7 +1592,7 @@ static struct fsck_inode *add_inode(struct ubifs_info *c,
15891592

15901593
if (inum > c->highest_inum) {
15911594
ubifs_err("too high inode number, max. is %lu",
1592-
c->highest_inum);
1595+
(unsigned long)c->highest_inum);
15931596
return ERR_PTR(-EINVAL);
15941597
}
15951598

@@ -1668,16 +1671,18 @@ static struct fsck_inode *read_add_inode(struct ubifs_info *c,
16681671
ino_key_init(c, &key, inum);
16691672
err = ubifs_lookup_level0(c, &key, &znode, &n);
16701673
if (!err) {
1671-
ubifs_err("inode %lu not found in index", inum);
1674+
ubifs_err("inode %lu not found in index", (unsigned long)inum);
16721675
return ERR_PTR(-ENOENT);
16731676
} else if (err < 0) {
1674-
ubifs_err("error %d while looking up inode %lu", err, inum);
1677+
ubifs_err("error %d while looking up inode %lu",
1678+
err, (unsigned long)inum);
16751679
return ERR_PTR(err);
16761680
}
16771681

16781682
zbr = &znode->zbranch[n];
16791683
if (zbr->len < UBIFS_INO_NODE_SZ) {
1680-
ubifs_err("bad node %lu node length %d", inum, zbr->len);
1684+
ubifs_err("bad node %lu node length %d",
1685+
(unsigned long)inum, zbr->len);
16811686
return ERR_PTR(-EINVAL);
16821687
}
16831688

@@ -1697,7 +1702,7 @@ static struct fsck_inode *read_add_inode(struct ubifs_info *c,
16971702
kfree(ino);
16981703
if (IS_ERR(fscki)) {
16991704
ubifs_err("error %ld while adding inode %lu node",
1700-
PTR_ERR(fscki), inum);
1705+
PTR_ERR(fscki), (unsigned long)inum);
17011706
return fscki;
17021707
}
17031708

@@ -1786,7 +1791,8 @@ static int check_leaf(struct ubifs_info *c, struct ubifs_zbranch *zbr,
17861791
if (IS_ERR(fscki)) {
17871792
err = PTR_ERR(fscki);
17881793
ubifs_err("error %d while processing data node and "
1789-
"trying to find inode node %lu", err, inum);
1794+
"trying to find inode node %lu",
1795+
err, (unsigned long)inum);
17901796
goto out_dump;
17911797
}
17921798

@@ -1819,7 +1825,8 @@ static int check_leaf(struct ubifs_info *c, struct ubifs_zbranch *zbr,
18191825
if (IS_ERR(fscki)) {
18201826
err = PTR_ERR(fscki);
18211827
ubifs_err("error %d while processing entry node and "
1822-
"trying to find inode node %lu", err, inum);
1828+
"trying to find inode node %lu",
1829+
err, (unsigned long)inum);
18231830
goto out_dump;
18241831
}
18251832

@@ -1832,7 +1839,7 @@ static int check_leaf(struct ubifs_info *c, struct ubifs_zbranch *zbr,
18321839
err = PTR_ERR(fscki);
18331840
ubifs_err("error %d while processing entry node and "
18341841
"trying to find parent inode node %lu",
1835-
err, inum);
1842+
err, (unsigned long)inum);
18361843
goto out_dump;
18371844
}
18381845

@@ -1923,56 +1930,60 @@ static int check_inodes(struct ubifs_info *c, struct fsck_data *fsckd)
19231930
fscki->references != 1) {
19241931
ubifs_err("directory inode %lu has %d "
19251932
"direntries which refer it, but "
1926-
"should be 1", fscki->inum,
1933+
"should be 1",
1934+
(unsigned long)fscki->inum,
19271935
fscki->references);
19281936
goto out_dump;
19291937
}
19301938
if (fscki->inum == UBIFS_ROOT_INO &&
19311939
fscki->references != 0) {
19321940
ubifs_err("root inode %lu has non-zero (%d) "
19331941
"direntries which refer it",
1934-
fscki->inum, fscki->references);
1942+
(unsigned long)fscki->inum,
1943+
fscki->references);
19351944
goto out_dump;
19361945
}
19371946
if (fscki->calc_sz != fscki->size) {
19381947
ubifs_err("directory inode %lu size is %lld, "
19391948
"but calculated size is %lld",
1940-
fscki->inum, fscki->size,
1941-
fscki->calc_sz);
1949+
(unsigned long)fscki->inum,
1950+
fscki->size, fscki->calc_sz);
19421951
goto out_dump;
19431952
}
19441953
if (fscki->calc_cnt != fscki->nlink) {
19451954
ubifs_err("directory inode %lu nlink is %d, "
19461955
"but calculated nlink is %d",
1947-
fscki->inum, fscki->nlink,
1948-
fscki->calc_cnt);
1956+
(unsigned long)fscki->inum,
1957+
fscki->nlink, fscki->calc_cnt);
19491958
goto out_dump;
19501959
}
19511960
} else {
19521961
if (fscki->references != fscki->nlink) {
19531962
ubifs_err("inode %lu nlink is %d, but "
1954-
"calculated nlink is %d", fscki->inum,
1963+
"calculated nlink is %d",
1964+
(unsigned long)fscki->inum,
19551965
fscki->nlink, fscki->references);
19561966
goto out_dump;
19571967
}
19581968
}
19591969
if (fscki->xattr_sz != fscki->calc_xsz) {
19601970
ubifs_err("inode %lu has xattr size %u, but "
19611971
"calculated size is %lld",
1962-
fscki->inum, fscki->xattr_sz,
1972+
(unsigned long)fscki->inum, fscki->xattr_sz,
19631973
fscki->calc_xsz);
19641974
goto out_dump;
19651975
}
19661976
if (fscki->xattr_cnt != fscki->calc_xcnt) {
19671977
ubifs_err("inode %lu has %u xattrs, but "
1968-
"calculated count is %lld", fscki->inum,
1978+
"calculated count is %lld",
1979+
(unsigned long)fscki->inum,
19691980
fscki->xattr_cnt, fscki->calc_xcnt);
19701981
goto out_dump;
19711982
}
19721983
if (fscki->xattr_nms != fscki->calc_xnms) {
19731984
ubifs_err("inode %lu has xattr names' size %u, but "
19741985
"calculated names' size is %lld",
1975-
fscki->inum, fscki->xattr_nms,
1986+
(unsigned long)fscki->inum, fscki->xattr_nms,
19761987
fscki->calc_xnms);
19771988
goto out_dump;
19781989
}
@@ -1985,11 +1996,12 @@ static int check_inodes(struct ubifs_info *c, struct fsck_data *fsckd)
19851996
ino_key_init(c, &key, fscki->inum);
19861997
err = ubifs_lookup_level0(c, &key, &znode, &n);
19871998
if (!err) {
1988-
ubifs_err("inode %lu not found in index", fscki->inum);
1999+
ubifs_err("inode %lu not found in index",
2000+
(unsigned long)fscki->inum);
19892001
return -ENOENT;
19902002
} else if (err < 0) {
19912003
ubifs_err("error %d while looking up inode %lu",
1992-
err, fscki->inum);
2004+
err, (unsigned long)fscki->inum);
19932005
return err;
19942006
}
19952007

@@ -2007,7 +2019,7 @@ static int check_inodes(struct ubifs_info *c, struct fsck_data *fsckd)
20072019
}
20082020

20092021
ubifs_msg("dump of the inode %lu sitting in LEB %d:%d",
2010-
fscki->inum, zbr->lnum, zbr->offs);
2022+
(unsigned long)fscki->inum, zbr->lnum, zbr->offs);
20112023
dbg_dump_node(c, ino);
20122024
kfree(ino);
20132025
return -EINVAL;

‎fs/ubifs/dir.c‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ struct inode *ubifs_new_inode(struct ubifs_info *c, const struct inode *dir,
161161
return ERR_PTR(-EINVAL);
162162
}
163163
ubifs_warn("running out of inode numbers (current %lu, max %d)",
164-
c->highest_inum, INUM_WATERMARK);
164+
(unsigned long)c->highest_inum, INUM_WATERMARK);
165165
}
166166

167167
inode->i_ino = ++c->highest_inum;
@@ -428,7 +428,8 @@ static int ubifs_readdir(struct file *file, void *dirent, filldir_t filldir)
428428
dbg_gen("feed '%s', ino %llu, new f_pos %#x",
429429
dent->name, (unsigned long long)le64_to_cpu(dent->inum),
430430
key_hash_flash(c, &dent->key));
431-
ubifs_assert(dent->ch.sqnum > ubifs_inode(dir)->creat_sqnum);
431+
ubifs_assert(le64_to_cpu(dent->ch.sqnum) >
432+
ubifs_inode(dir)->creat_sqnum);
432433

433434
nm.len = le16_to_cpu(dent->nlen);
434435
over = filldir(dirent, dent->name, nm.len, file->f_pos,

0 commit comments

Comments
 (0)