Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bde40fe0 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

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
parents 6ef190cc 7424bac8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -538,7 +538,7 @@ void dbg_dump_node(const struct ubifs_info *c, const void *node)
		printk(KERN_DEBUG "\t%d orphan inode numbers:\n", n);
		for (i = 0; i < n; i++)
			printk(KERN_DEBUG "\t  ino %llu\n",
			       le64_to_cpu(orph->inos[i]));
			       (unsigned long long)le64_to_cpu(orph->inos[i]));
		break;
	}
	default:
+1 −1
Original line number Diff line number Diff line
@@ -426,7 +426,7 @@ static int ubifs_readdir(struct file *file, void *dirent, filldir_t filldir)

	while (1) {
		dbg_gen("feed '%s', ino %llu, new f_pos %#x",
			dent->name, le64_to_cpu(dent->inum),
			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);

+0 −1
Original line number Diff line number Diff line
@@ -507,7 +507,6 @@ int ubifs_find_free_space(struct ubifs_info *c, int min_space, int *free,
		rsvd_idx_lebs = 0;
	lebs = c->lst.empty_lebs + c->freeable_cnt + c->idx_gc_cnt -
	       c->lst.taken_empty_lebs;
	ubifs_assert(lebs + c->lst.idx_lebs >= c->min_idx_lebs);
	if (rsvd_idx_lebs < lebs)
		/*
		 * OK to allocate an empty LEB, but we still don't want to go
+11 −3
Original line number Diff line number Diff line
@@ -334,15 +334,15 @@ int ubifs_garbage_collect_leb(struct ubifs_info *c, struct ubifs_lprops *lp)

		err = move_nodes(c, sleb);
		if (err)
			goto out;
			goto out_inc_seq;

		err = gc_sync_wbufs(c);
		if (err)
			goto out;
			goto out_inc_seq;

		err = ubifs_change_one_lp(c, lnum, c->leb_size, 0, 0, 0, 0);
		if (err)
			goto out;
			goto out_inc_seq;

		/* Allow for races with TNC */
		c->gced_lnum = lnum;
@@ -369,6 +369,14 @@ int ubifs_garbage_collect_leb(struct ubifs_info *c, struct ubifs_lprops *lp)
out:
	ubifs_scan_destroy(sleb);
	return err;

out_inc_seq:
	/* We may have moved at least some nodes so allow for races with TNC */
	c->gced_lnum = lnum;
	smp_wmb();
	c->gc_seq += 1;
	smp_wmb();
	goto out;
}

/**
+1 −2
Original line number Diff line number Diff line
@@ -1024,14 +1024,13 @@ static int mount_ubifs(struct ubifs_info *c)
		goto out_dereg;
	}

	sprintf(c->bgt_name, BGT_NAME_PATTERN, c->vi.ubi_num, c->vi.vol_id);
	if (!mounted_read_only) {
		err = alloc_wbufs(c);
		if (err)
			goto out_cbuf;

		/* Create background thread */
		sprintf(c->bgt_name, BGT_NAME_PATTERN, c->vi.ubi_num,
			c->vi.vol_id);
		c->bgt = kthread_create(ubifs_bg_thread, c, c->bgt_name);
		if (!c->bgt)
			c->bgt = ERR_PTR(-EINVAL);
Loading