Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'linux-next' of git://git.infradead.org/~dedekind/ubifs-2.6

* 'linux-next' of git://git.infradead.org/~dedekind/ubifs-2.6:
UBIFS: fix printk format warnings
UBIFS: remove incorrect assert
UBIFS: TNC / GC race fixes
UBIFS: create the name of the background thread in every case

+15 -9
+1 -1
fs/ubifs/debug.c
··· 538 538 printk(KERN_DEBUG "\t%d orphan inode numbers:\n", n); 539 539 for (i = 0; i < n; i++) 540 540 printk(KERN_DEBUG "\t ino %llu\n", 541 - le64_to_cpu(orph->inos[i])); 541 + (unsigned long long)le64_to_cpu(orph->inos[i])); 542 542 break; 543 543 } 544 544 default:
+1 -1
fs/ubifs/dir.c
··· 426 426 427 427 while (1) { 428 428 dbg_gen("feed '%s', ino %llu, new f_pos %#x", 429 - dent->name, le64_to_cpu(dent->inum), 429 + dent->name, (unsigned long long)le64_to_cpu(dent->inum), 430 430 key_hash_flash(c, &dent->key)); 431 431 ubifs_assert(dent->ch.sqnum > ubifs_inode(dir)->creat_sqnum); 432 432
-1
fs/ubifs/find.c
··· 507 507 rsvd_idx_lebs = 0; 508 508 lebs = c->lst.empty_lebs + c->freeable_cnt + c->idx_gc_cnt - 509 509 c->lst.taken_empty_lebs; 510 - ubifs_assert(lebs + c->lst.idx_lebs >= c->min_idx_lebs); 511 510 if (rsvd_idx_lebs < lebs) 512 511 /* 513 512 * OK to allocate an empty LEB, but we still don't want to go
+11 -3
fs/ubifs/gc.c
··· 334 334 335 335 err = move_nodes(c, sleb); 336 336 if (err) 337 - goto out; 337 + goto out_inc_seq; 338 338 339 339 err = gc_sync_wbufs(c); 340 340 if (err) 341 - goto out; 341 + goto out_inc_seq; 342 342 343 343 err = ubifs_change_one_lp(c, lnum, c->leb_size, 0, 0, 0, 0); 344 344 if (err) 345 - goto out; 345 + goto out_inc_seq; 346 346 347 347 /* Allow for races with TNC */ 348 348 c->gced_lnum = lnum; ··· 369 369 out: 370 370 ubifs_scan_destroy(sleb); 371 371 return err; 372 + 373 + out_inc_seq: 374 + /* We may have moved at least some nodes so allow for races with TNC */ 375 + c->gced_lnum = lnum; 376 + smp_wmb(); 377 + c->gc_seq += 1; 378 + smp_wmb(); 379 + goto out; 372 380 } 373 381 374 382 /**
+1 -2
fs/ubifs/super.c
··· 1024 1024 goto out_dereg; 1025 1025 } 1026 1026 1027 + sprintf(c->bgt_name, BGT_NAME_PATTERN, c->vi.ubi_num, c->vi.vol_id); 1027 1028 if (!mounted_read_only) { 1028 1029 err = alloc_wbufs(c); 1029 1030 if (err) 1030 1031 goto out_cbuf; 1031 1032 1032 1033 /* Create background thread */ 1033 - sprintf(c->bgt_name, BGT_NAME_PATTERN, c->vi.ubi_num, 1034 - c->vi.vol_id); 1035 1034 c->bgt = kthread_create(ubifs_bg_thread, c, c->bgt_name); 1036 1035 if (!c->bgt) 1037 1036 c->bgt = ERR_PTR(-EINVAL);
+1 -1
fs/ubifs/tnc.c
··· 1476 1476 } 1477 1477 1478 1478 err = fallible_read_node(c, key, &zbr, node); 1479 - if (maybe_leb_gced(c, zbr.lnum, gc_seq1)) { 1479 + if (err <= 0 || maybe_leb_gced(c, zbr.lnum, gc_seq1)) { 1480 1480 /* 1481 1481 * The node may have been GC'ed out from under us so try again 1482 1482 * while keeping the TNC mutex locked.