UBI: add UBI devices reference counting
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Mon, 17 Dec 2007 15:37:26 +0000 (17:37 +0200)
committerGrazvydas Ignotas <notasas@gmail.com>
Mon, 25 May 2009 14:08:26 +0000 (17:08 +0300)
commitd1214a10b8a1caff16508e8b9c5158cba8c7dd0e
treea766dd0056d1b607892b86fcae8b90796ecd22a9
parentf6f5e263b1d7edfbb2faed57f4c54dcfd19e9423
UBI: add UBI devices reference counting

This is one more step on the way to "removable" UBI devices. It
adds reference counting for UBI devices. Every time a volume on
this device is opened - the device's refcount is increased. It
is also increased if someone is reading any sysfs file of this
UBI device or of one of its volumes.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
drivers/mtd/ubi/build.c
drivers/mtd/ubi/cdev.c
drivers/mtd/ubi/eba.c
drivers/mtd/ubi/kapi.c
drivers/mtd/ubi/ubi.h
drivers/mtd/ubi/vmt.c
drivers/mtd/ubi/wl.c