From: Daniel Mack Date: Thu, 2 Jul 2009 15:15:47 +0000 (+0200) Subject: UBIFS: allow more than one volume to be mounted X-Git-Tag: v2.6.31-rc3~22^2~5 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=7fcd9c3ecbf09c0a77db7ba01aac75b32fb79a93;p=linux.git UBIFS: allow more than one volume to be mounted UBIFS uses a bdi device per volume, but does not care to hand out unique names to each of them. This causes an error when trying to mount more than one volumes. Append the UBI volume and device ID to avoid that. [Amended a bit by Artem Bityutskiy] Signed-off-by: Daniel Mack Cc: Artem Bityutskiy Cc: Adrian Hunter Cc: linux-mtd@lists.infradead.org Signed-off-by: Artem Bityutskiy --- diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c index 3507d0ed542d..26d2e0d80465 100644 --- a/fs/ubifs/super.c +++ b/fs/ubifs/super.c @@ -1976,7 +1976,8 @@ static int ubifs_fill_super(struct super_block *sb, void *data, int silent) err = bdi_init(&c->bdi); if (err) goto out_close; - err = bdi_register(&c->bdi, NULL, "ubifs"); + err = bdi_register(&c->bdi, NULL, "ubifs_%d_%d", + c->vi.ubi_num, c->vi.vol_id); if (err) goto out_bdi;