CHROMIUM: md: bootcache don't delete sys files
authorPaul Taysom <taysom@chromium.org>
Wed, 17 Oct 2012 16:54:12 +0000 (09:54 -0700)
committerGerrit <chrome-bot@google.com>
Fri, 9 Nov 2012 01:25:06 +0000 (17:25 -0800)
Because the device mapper already deletes any sys files
created by dm-bootcache, it shouldn't delete them
when cleaning up.

BUG=chromium-os:35377
TEST=ran bootcachetest on stumpy, arm

Change-Id: I73d40a6de17b15827da2dd421a29294e286ebc1a
Signed-off-by: Paul Taysom <taysom@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/35836
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
drivers/md/dm-bootcache.c

index 30af7fc..d45dc97 100644 (file)
@@ -1191,6 +1191,10 @@ static int bootcache_status(struct dm_target *ti, status_type_t type,
 
 static void bootcache_dtr(struct dm_target *ti)
 {
+       /*
+        * Doesn't have to clean-up the meta files in sysfs
+        * because the device mapper has already done it.
+        */
        struct bootcache *cache = (struct bootcache *)ti->private;
 
        DMDEBUG("Destroying bio set");
@@ -1199,9 +1203,6 @@ static void bootcache_dtr(struct dm_target *ti)
        DMDEBUG("Putting dev");
        dm_put_device(ti, cache->dev);
 
-       DMDEBUG("Remove sysfs files");
-       bootcache_remove_all_files(cache);
-
        DMDEBUG("Destroying config");
        kfree(cache);
 }